1. Try to initialize log4j within your start up servlet. 
2. if the property you are using is application specific, place it in
application specific xml file. Decouple log4j from application specific
properties.

Thanks
Roxy

-----Original Message-----
From: chuanjiang lo [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 26, 2006 4:02 AM
To: Log4J Users List
Subject: Loading sequence of log4j

Hi all

I have this start up servlet that does the initializing some system
parameters.

 <load-on-startup>1</load-on-startup>
And i place this servlet on the first priority

In the servlet i have something..
System.setProperty("admin-console-abs-home",
getServletContext().getRealPath("")+getServletConfig().getInitParameter(
"adminConsoleLog"));

So the log4j.xml uses something like
<param name="File" value="${admin-console-abs-home}"/>

Sometimes the Start up servlet runs first and initalize the property.
But at
times log4j starts first and giving an error
log4j:ERROR setFile(null,true) call failed.

So how can i ensure that log4j initalizes only after my start up servlet
finishes initalizing?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to