cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [RT C2]: Logging information
Date Wed, 27 Jun 2001 17:21:15 GMT
On Wed, 27 Jun 2001, Carsten Ziegeler wrote:

> Hi C2ers,
>
> what do you think about enhancing the information logged to the
> cocoon.log?
> For debugging etc. it would help to have a better formatted
> time information, the current url request perhaps the current
> ip address of the client etc.
> So I would suggest to pass the current environment/objectModel
> to the logging methods and they can extract everything they
> need from it and log it.

That wont work. You cannot extend the logging methods. You can write a
custom LogTarget. We have solved such things by having a LogTarget as a
Avalon Component which is put into work after the ComponentManager has
been initialized.  But this only works for Configuration stuff. As the
Environment/objectModel are request dependant (not thread safe) but the
LogTarget is/should be ThreadSafe you have a problem.

The other way is (IIRC) some contextStack you can push things upon and
have your LogTarget pop it off there. But also I don't know how this
works in a multi threaded environment like a Servlet.

Giacomo


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


Mime
View raw message