• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem configuring log4j in my webapp

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am replacing all of my System.out.println() statements with logger.debug() statements in my sample webapp. I was able to do that successfully through out the application. However my question is related to configuration. In order to get it working I had to specify the absolute path of the log4j.properties file in the web.xml which I don't really like. Something like:




Any pointers on how to replace the absolute path with relative ?

Thannks.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you go back and explain why you need the location of the properties file to be a context parameter? Normally all you have to do is to put the properties file into the WEB-INF/classes folder and the log4j code finds it there automatically.
 
Aakash Chandel
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Can you go back and explain why you need the location of the properties file to be a context parameter? Normally all you have to do is to put the properties file into the WEB-INF/classes folder and the log4j code finds it there automatically.



Because I saw it in some example online. :)
 
reply
    Bookmark Topic Watch Topic
  • New Topic