cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Rolappe" <m_rola...@web.de>
Subject AW: [RT] Logging in Cocoon
Date Thu, 27 May 2004 13:48:58 GMT


> -----Ursprungliche Nachricht-----
> Von: dev-return-61488-m_rolappe=web.de@cocoon.apache.org
> [mailto:dev-return-61488-m_rolappe=web.de@cocoon.apache.org]Im Auftrag
> von Berin Loritsch
> Gesendet: Donnerstag, 27. Mai 2004 15:35
> An: dev@cocoon.apache.org
> 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.

> 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
IIRC.

> configuration file is.  There have been many complaints of inconsistant
> configuration of the log files because of the uncertainty of
> the servlet classpath.  If the implementers of your servlet engine
> inadvertently put a differing implementation than you want to use,
> there is a good chance you will be logging to your servlet container's
> targets instead of Cocoon's.  Also if you have several instances of
> Cocoon under one "webapp" in your ServletContainer you may get some
> mixed results.

those things haven't happened to me yet, so I can't comment.

> 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.



Mime
View raw message