logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Lindquist" <lindq...@obsidianrose.net>
Subject Re: Resin with log4j (long)
Date Thu, 05 Dec 2002 20:37:06 GMT
Thank you Rick..

Log4j was being initialized in the startup servlet's init method, but it
wasn't technically the -first- thing that was done. Neither of the two
preceding operations used log4j, but obviously those classes must have
created something that does.. because the errors went away when I bumped up
the log4j initialization to be the first thing in the init() method.

----- Original Message -----
From: "Morris, Rick" <rick.morris@brightpoint.com>
To: "'Log4J Users List'" <log4j-user@jakarta.apache.org>
Sent: Thursday, December 05, 2002 1:50 PM
Subject: RE: Resin with log4j (long)

We had this problem for a while until we realized that the log4j initializer
servlet needed to be started first. If you are using a servlet to initialize
log4j, just make sure it is loaded before anything that uses log4j and you
should be fine.

-----Original Message-----
From: Peter Lindquist [mailto:lindquip@obsidianrose.net]
Sent: Thursday, December 05, 2002 2:53 PM
To: log4j-user@jakarta.apache.org
Subject: Resin with log4j (long)

I've researched this a fair amount.. any input or suggested new directions
would be most appreciated.

Problem: Resin starts with log4j warnings (Win2k and/or linux)

Resin 2.1.5 (built Fri Oct  4 12:10:31 PDT 2002)
Copyright(c) 1998-2002 Caucho Technology.  All rights reserved.

Starting Resin on Thu, 05 Dec 2002 12:29:43 -0600 (CST)
log4j:WARN No appenders could be found for logger (root).
log4j:WARN Please initialize the log4j system properly.

Here's what I've got.

I'm using an xml config file and the DOMConfigurator class for loading it.
The root logger has an appender assigned to it and the config file IS being
read. After these warnings are generated, log4j proceeds to load and log
messages according to my config file. Updating the file results in immediate
new behavior.

I turned on debugging for log4j (<log4j:configuration debug="true">) and
received the following console messages AFTER the warnings presented above..
which means the warnings were printed before the config file had even been
read. I've reduced the output to what seemed relevant, as the whole thing is
a bit too much for the eyes.

configFileName: C:/home/HEAD/Properties/logging.xml
log4j: Threshold ="null".
log4j: Retreiving an instance of org.apache.log4j.Logger.
. . .
log4j: Level value for root is  [DEBUG].
log4j: Desired Level sub-class: [util.PinLogLevels]
log4j: root level set to DEBUG
log4j: Adding appender named [MainLog] to category [root].
http listening to *:80

The relevant parts of my config file:

<log4j:configuration debug="true">
 <appender name="MainLog" class="org.apache.log4j.RollingFileAppender">
  <param name="file" value="C:/home/HEAD/logs/pinpoint.log"/>
  <param name="append" value="true"/>
  <param name="MaxFileSize" value="10MB"/>
  <param name="MaxBackupIndex" value="10"/>
  <layout class="org.apache.log4j.PatternLayout">
   <param name="ConversionPattern" value="%d %-5p [%t] %c%x - %m%n"/>

  <priority value ="DEBUG" class="util.PinLogLevels"/>
  <appender-ref ref="MainLog"/>


My classpath directive within resin.conf which loads the log4j.jar file is
associate with the web-app:

<classpath id='C:/home/HEAD/lib' library-dir=true/>

Any ideas?

Thank you..

To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

View raw message