Differences between revisions 2 and 3
Revision 2 as of 2006-07-05 17:04:21
Size: 876
Comment:
Revision 3 as of 2009-09-20 23:50:57
Size: 876
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

If you run with "-Dlog4j.debug" then log4j will print out info to standard output telling how it is trying to configure itself. Looking through that will tell you where it is looking for the config file.

In application servers like Tomcat you usually need to have both log4j.jar and the config file (log4j.properties or log4j.xml) at either the server level or app level. You should not have multiple log4j.jar files. If you want one config for all applications then you want log4j at the server level and you will want log4j.jar in common/lib and your config file in common/classes. If you want one config per application then you want log4j at the app level and you will want log4j.jar in WEB_INF/lib and your config file in WEB-INF/classes. There are issues with JBoss so it isn't quite that easy. You should not have log4j.jar at both the server and app level.

Log4jConfigurationHelp (last edited 2009-09-20 23:50:57 by localhost)