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.createTarget(LF5TargetFactory.java:81)
at org.apache.avalon.excalibur.logger.DefaultLogTargetManager.configure(DefaultLogTargetManager.java:129)
at org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
at org.apache.avalon.excalibur.logger.DefaultLogKitManager.setupTargetManager(DefaultLogKitManager.java:292)
at org.apache.avalon.excalibur.logger.DefaultLogKitManager.configure(DefaultLogKitManager.java:209)
.... (stack trace continues)


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>


 <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? Are certain variables only available for certain log target factories? I just copied the log target config directly from one of the included <cocoon> ones, so maybe that's a problem.

Thanks,

Sonny

From: Reinhard P�tz <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE: where to download LogFactor5?
Date: Mon, 11 Aug 2003 09:36:20 +0200

From: Austin Tashis [mailto:[EMAIL PROTECTED]

> On Sunday, August 10, 2003, at 11:32  PM, Sonny Sukumar wrote:
>
> >
> > I've tried numerous times to access servidium.com to download what
> > some people say is the best log analysis tool, LogFactor5, but the
> > site is always down.  The tool was apparently donated to the open
> > source community, which is why it's free.
> >
> > Does anybody know where else it might be available for download?
>
> It is distributed as part of log4j.
> http://jakarta.apache.org/log4j/docs/index.html


It is aslo part of the Cocoon distribution. Change the configuration of the logger in logkit.xconf to use logfactor5.

See also http://wiki.cocoondev.org/Wiki.jsp?page=ConfiguringTheLogs

Cheers,
Reinhard


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


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



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



Reply via email to