• 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

LOG4J with Tomacat on Eclipse

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
How can I configure LOG4J with Tomcat. I assume I need to set system property log4j.configuration=<my log4j xml file>. But where should I do it.

1) Eclipse does not have any place to set it up.
2) Do I need to modify catalina.bat or start.bat file to pass in this system property.
3) Any good to read article on it.

Please let me know. Any plug in to set it up will also help.

Cheers
Vicky
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured this out for TC5:
- copy log4j.jar and commons-logging.jar to $CATALINE_HOME/common/lib
- copy your log4j.properties (or xml) to $CATALINE_HOME/common/classes

restart tomcat, et voila.

It's very annoying this "log4j does not work on tomcat" issue, especially
since the 'official' tomcat documentation on this topic is wrong
 
reply
    Bookmark Topic Watch Topic
  • New Topic