cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: The Cocoon Handbook - info on Log4J requested
Date Wed, 13 Oct 2004 12:11:13 GMT
Hi Helma,

> could someone either tell me how to make Cocoon use Log4J rather than 
> the
> Avalon LogKit ...

Not sure if this is complete, you might want to check it:

a) add this to web.xml

<init-param>
         <param-name>logger-class</param-name>
         <param-value>LOG4J</param-value>
</init-param>

b) add log4j.jar in WEB-INF/lib if needed

c) create WEB-INF/classes/log4j.properties to setup logging.

Another useful logging trick is to use log4j for the output of ant as 
well, by setting these options on the ant command line:

   -listener org.apache.tools.ant.listener.Log4jListener
   -Dlog4j.configuration=file:/path-to-log4j-config

This is very useful for crazy folk like me who start their production 
systems via ant ;-)

Hope this helps
-Bertrand


Mime
View raw message