cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: AW: [RT] Logging in Cocoon
Date Thu, 27 May 2004 13:57:39 GMT
Marco Rolappe wrote:

>>-----Ursprungliche Nachricht-----
>>[]Im Auftrag
>>von Berin Loritsch
>>Gesendet: Donnerstag, 27. Mai 2004 15:35
>>Betreff: Re: [RT] Logging in Cocoon
>>Carsten Ziegeler wrote:
>>>Marco Rolappe wrote:
>>>>why depend explicitly on log4j instead of using
>>>>commons-logging? AFAIK when log4j is available
>>>>commons-logging automatically uses it before falling back to
>>>>JDK logger etc.
>>>Currently - as we are using Avalon for our components - we use
>>>an avalon logger which is not directly logging but uses a
>>>logging subsystem. This subsystem can be logkit, log4j etc.
>>>I think commons-logging is possible as well.
>>>I honestly don't know if it's better to use commons-logging
>>>or directly use log4j.
>>If you were to ask the original author of Log4J, the answer is
>>simple: directly use Log4J.  When I described to him how Avalon
>>does the abstraction, he said he liked the sound of it better
>>than the commons logging solution.
> which abstraction exactly? the Logger interface is more or less the same
> when compared to logkit's Logger.

The Avalon approach--only because of the lack of dynamic setup/
configuration.  It is all completely explicit.

>>What's wrong with commons logging?  Nothing if you have a standalone
>>application.  However, it uses classpath discovery to determine if
>>you have LogKit, Log4J, JDK 1.4 logging, and where the logging
> it can use classpath discovery, but it can also be explicitly configured

Perhaps that came out of his constant urging.  As long as it can be
configured explicitly I have no problems.  However, black magic should
be avoided if at all possible.

>>I don't have all the links right now, but suffice it to say that
>>Commons Logging uses black magic to set everything up at startup.
> as mentioned it can use 'black magic' but it doesn't depend on it.

As long as we don't use the black magic, I am fine.  Building on sand
is bad, as we all know.

View raw message