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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]