logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ford, Peter" <Peter.F...@travelocity.com>
Subject Default log4j initialization
Date Fri, 10 Jun 2005 22:26:38 GMT

Hi,

I'm trying to get log4j to initialize when my app starts up, but it
doesn't seem to be working.

My command line includes "-Dlog4j.configuration=cfg/logger.xml" and my
"main()" method does an explicit call to Logger.getLogger() to force the
Logger class to load and hence get the static initializer to run.

It just isn't working. I'm having to follow the getLogger() call with
DOMConfigurator.configure(System.getProperty("log4j.configuration")) to
get it to set up. I have no idea what I've missed here.

I'm using log4j 1.2.9; the manual says the default initialization is in
the Logger class's static initializer... But when I looked at the source
of the Logger class I couldn't find any static initializer (or in the
Category class that it extends).

--Pete

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message