users@glassfish.java.net

Log4j is not logging

From: Jason Lee <lee_at_iecokc.com>
Date: Tue, 29 Aug 2006 14:57:01 -0500

I touched on this briefly several weeks ago, but was not able to follow
up at the time. At any rate, we're using log4j (with and without the
commons logging facade -- doesn't seem to matter), but none of our log
messages are going to where we have it configured in log4j.xml. They
all end up in the domain server log. The log4j config looks like this:
 
 <appender name="file" class="org.apache.log4j.RollingFileAppender">
  <param name="File" value="d:/java/logs/Oprah/OrderTransfer.log" />
  <param name="MaxFileSize" value="10MB" />
  <param name="MaxBackupIndex" value="5" />
  <layout class="org.apache.log4j.PatternLayout">
   <param name="ConversionPattern" value="%d{DATE} %5p %c{1}:%L - %m%n"
/>
  </layout>
 </appender>

I've tried various permutations of that including leaving off the drive
letter, with no noticeable effect. The config file is in the root of
$APP.jar which is in the root of $APP.ear. We're also bundling the
log4j and commons logging jars with the apps ($APP.ear/lib/) in case
that matters.
 
Any ideas why we can't get a handle on the logging? I'm trying to track
down an unrelated problem with an app, and the logging issue is really
causing me some heartburn. :) Thanks...
 
-----
Jason Lee
Programmer/Analyst
http://www.iecokc.com <http://www.iecokc.com/>