nugget SourceForge.net Logo

 Java Nuggets

home
encoding
io
log4WebLogic
 log4WebLogic

To make WebLogic Server's log include messages from Log4j and Commons Logging, insert log4WebLogic.jar into the server's CLASSPATH, at the beginning.

Why is this useful?  There are several reasons.  You can see the log messages even though you can't see the server's System.out or System.err streams (as often happens in a big server farm).  You can see messages from all server software modules in one time-sequenced log, which can help you understand what's going on.  You can use WebLogic tools to filter the log.

How does it work?  Log4j reads log4j.properties, and consequently Log4j routes messages to WebLogicAppender, which routes them to WebLogic.  You can interfere with this.  For more information, see log4j.properties and commons-logging.properties.