You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorg Heymans <jh...@domek.be> on 2005/03/30 14:39:39 UTC

cocoon and log4j

Hi,

I have an issue with configuring log4j in cocoon. I would like to 
configure log4j solely in log4j.xconf, piggybacking the cocoon log4j 
initialization.

It seems that the loggers i setup only work for "cocoon" components, and 
not for standalone classes. Can anyone confirm this?

Thanks
Jorg


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


Re: cocoon and log4j

Posted by Jorg Heymans <jh...@domek.be>.
Antonio Gallardo wrote:
>>Hi,
>>
>>I have an issue with configuring log4j in cocoon. I would like to
>>configure log4j solely in log4j.xconf, piggybacking the cocoon log4j
>>initialization.
>>
>>It seems that the loggers i setup only work for "cocoon" components, and
>>not for standalone classes. Can anyone confirm this?
> 
> 
> See:
> 
> http://wiki.apache.org/cocoon/JavaLogging

Thanks Antonio, didn't spot that one.

This wiki entry confuses me though ...

It starts off promising by saying:
"This page explains how to implement Cocoon-style logging, in a Java 
class that is not inherited from a Cocoon or Avalon component class."

And then it tells you to implement Avalon interfaces or extend 
AbstractLogEnabled ! :)

I don't want my classes to have anything to do with Avalon at all 
because we reuse them in other non-cocoon and non-avalon projects.

I solved it by creating an initalization servlet that initializes log4j 
using log4j.xconf. It seems that this is the correct way to go about 
this, according to CocoonServlet.java line 786
"// the log4j support requires currently that the log4j system is 
already configured elsewhere"


Thoughts?
Jorg


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


Re: cocoon and log4j

Posted by Antonio Gallardo <ag...@agssa.net>.
On Mie, 30 de Marzo de 2005, 6:39, Jorg Heymans dijo:
> Hi,
>
> I have an issue with configuring log4j in cocoon. I would like to
> configure log4j solely in log4j.xconf, piggybacking the cocoon log4j
> initialization.
>
> It seems that the loggers i setup only work for "cocoon" components, and
> not for standalone classes. Can anyone confirm this?

See:

http://wiki.apache.org/cocoon/JavaLogging

Best Regards,

Antonio Gallardo


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