This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Tomcat and the fly likes LOG4J with Tomacat on Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "LOG4J with Tomacat on Eclipse" Watch "LOG4J with Tomacat on Eclipse" New topic
Author

LOG4J with Tomacat on Eclipse

vicky kumar
Ranch Hand

Joined: Dec 13, 2002
Posts: 55
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
Eelco den Heijer
Ranch Hand

Joined: Jan 17, 2002
Posts: 61
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


== <br />Rgrds,<br />Eelco<br /> <br />SCJP, SCJD, SCBCD, SCWD, SCEA
 
 
subject: LOG4J with Tomacat on Eclipse