avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harmeet Bedi" <hb...@yahoo.com>
Subject Logger package
Date Tue, 27 Mar 2001 22:49:51 GMT
I think it would be useful to apply the idea of programming for
replaceability in the context of logger functionality.

Logger could be a block(possibly 1st block) with configuration information
of log targets.
If that is problematic, then
- that points to a weakness in Avalon. The component manager approach
is good but a global component registry would make it easier esp for code in
migration towards blocks. LogKit acts as a globally available registry of
loggers that ComponentManager does not provide.
- A simpler and maybe a part way step to logger block could to have a
factory that has different Logger objects as interfaces - Logger, LogKit
etc. These interface could be mapped to different implementations in
org.apache.log or org.apache.log4j. 'org.apache.log' could be trivial and
done first and after that if someone wants 'org.apache.log4j'.

I find org.apache.log easier to follow, but log4j seems to have more
features and mindshare. Either way both seem good. My only problem is that I
need to learn about 2 log implementations. That sucks, but is definitely
better than 0. :-)

If this makes sense, I could implement an encapsulation of logger
functionality this weekend, if no one else wants to. It would map to
org.apache.log and if someone wants to they can map it to org.apache.log4j
package. The 2 API are really similar, interface(s) should be easily map to
either implementation.

what do you say ?

Harmeet


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Mime
View raw message