Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: log4j config problem

Yansheng Lin

2004-01-29

Replies:

ok, i will read it one more time. thanks!

-----Original Message-----
From: Daniel [mailto:dantest@(protected)]
Sent: Thursday, January 29, 2004 12:54 PM
To: Tomcat Users List
Subject: Re: log4j config problem



Hi Yan,

How log4j loads its config is documented at:
 http://logging.apache.org/log4j/docs/manual.html

in the section:
 "Default Initialization Procedure"

So unless your webapp looks at the init-param, log4j won't use that in
web.xml. It worked in WEB-INF/classes because that's in the class path
hierarchy for log4j to look at when it auto-configs itself.

Regards,
Daniel

On Thu, 29 Jan 2004, Yansheng Lin wrote:

> This is driving me nuts!
>
> Before I had my log4j.properties file under 'WEB-INF/classes/', and in the
> 'web.xml' everything worked fine when I had
>
>   <init-param>
>     <param-name>log4j-config</param-name>
>     <param-value>/WEB-INF/classes/log4j.properties</param-value>
>   </init-param>
>
>
> But after I moved log4j.properties up one level -- 'WEB-INF/, things stopped
> working. I always get the warning:
>  log4j:WARN Please initialize the log4j system properly.
>
>   <init-param>
>     <param-name>log4j-config</param-name>
>     <param-value>/WEB-INF/log4j.properties</param-value>
>   </init-param>
>
> What reasonable explaination can I derive from this? That the <init-param> in
> my web.xml is not getting read when the application was loaded? Can anyone
give
> me a better explaination?
>
> Thanks!
>
> -Yan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.