cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <reinhard_po...@gmx.net>
Subject RE: where to download LogFactor5?
Date Tue, 12 Aug 2003 07:58:55 GMT

From: Sonny Sukumar

> Thanks Reinhad, but I still can't get it to work...
> 
> I'm running Cocoon 2.0.4, so I needed to upgrade my 
> excalibur-logging jar to 
> get the LF5TargetFactory.  I then configured logkit.xconf, 
> set one of my 
> Actions to log using a new log category I created, and 
> restarted cocoon, but 
> I got the following error:
> 
> java.lang.NoClassDefFoundError: org/apache/log/output/lf5/LF5LogTarget
> 	at 
> org.apache.avalon.excalibur.logger.factory.LF5TargetFactory.cr
> eateTarget(LF5TargetFactory.java:81)
> 	at 
> org.apache.avalon.excalibur.logger.DefaultLogTargetManager.con
> figure(DefaultLogTargetManager.java:129)
> 	at 
> org.apache.avalon.framework.container.ContainerUtil.configure(
ContainerUtil.java:239)
> 	at 
> org.apache.avalon.excalibur.logger.DefaultLogKitManager.setupT
> argetManager(DefaultLogKitManager.java:292)
> 	at 
> org.apache.avalon.excalibur.logger.DefaultLogKitManager.config
> ure(DefaultLogKitManager.java:209)
> .... (stack trace continues)

Obviously the necessary jar is missing. Are you sure you put it into the
lib directory?

> 
> Here's my additions to logkit.xconf:
> 
>   <factory type="lf5" 
> class="org.apache.avalon.excalibur.logger.factory.LF5TargetFactory"/>
> 
>   <lf5 id="app">
>       <filename>${context-root}/WEB-INF/logs/app.log</filename>
>       <format type="lf5">
>         %7.7{priority} %{time}   [%{category}] (%{uri}) 
> %{thread}/%{class:short}:{message}\n%{throwable}
>       </format>
>       <append>false</append>
>   </lf5>

<fl5 id="app"/> should be enough.

> 
>   <category name="app-debug" log-level="DEBUG">
>     <log-target id-ref="app"/>
>   </category>
> 
> I created an empty app.log file in 
> $CATALINA_HOME/WEB-INF/logs to receive 
> the log entries, but no luck.
> 
> Question: How do the variables ${context-root}, etc. become 
> available within 
> logkit.xconf?  

Don't know but I guess this is provided by the logging framework. But as
mentioned not necessary for you.

... and maybe you download the latest Cocoon 2.1 release -it contains
the logkit.xconf with the settings for lf5 and the necessary library.

Cheers,
Reinhard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message