Posted By:
Christopher_Koenigsberg
Posted On:
Wednesday, July 23, 2003 12:03 PM
log4j.appender.Appender1=org.apache.log4j.RollingFileAppender
log4j.appender.Appender1.File=/tmp/our.log
That is from a log4j.properties file here.
And then for our loggers in addition to specifying the level, we also give that Appender1 name so they will use it.
e.g. if our code does Logger.getLogger("com.our"), we put the config line in as:
log4j.logger.com.our=DEBUG, Appender1
Unfortunately, in a web app, while this IS working with Weblogic (writing to /tmp/our.log), it is NOT working with JBoss (our logs still go to the "server.log" along with org.jboss, org.apache etc. crap)!
perhaps JBoss will not let a web app write to the "/tmp" of the underlying filesystem, so we will have to try some relative path instead of the fully-qualified one (when we get around to it)...