Nicola,

Log wars? :-PPP
A ref to the fact that we (Apache/ the world) will never settle on a single design.

Let's say: "logging, can't we finally solve it?" ;-)
:-)

I'd disagree. I am fond of the no-logging design for reusable beans (use a monitor concept instead).

Ok, let me be more clear on my position: reusable beans should not depend on any logging stuff. This point was a possible compromise, but I don't like it much. Would you care explaining it a bit more in detail and proposing it ti Jakarta Commons?
I'll do some work on it.

2) Avalon Framework uses commons-logging as the facade for logging to
different implementations. This means that coarse-grained components
keep using AF4-compatible IOC.

Correction:- "Avalon Framework facilitates CommonsLogging at instance level" (CommonsLogEnabled, AbstractCommonsLogEnabled).

You mean using CL actually in the code? Hmmm, why simply not use our logger interface still and CL as a facade's facade? In your "correction", users can use different Loggers in the code, correct? Hmmm...
My point was that A-F 'uses commons-logging' is a meme that will only add to cunfusion.

 3) Every Avalon container registers it's own LogFactory as a top-level
    LogFactory, so that it intercepts *all* logging calls and can deal
    with them in a centralized way, somewhat inverting the control.

I did much experimentation some months ago. It is not so easy.

Why?
Well for a start, a central log factory for all components running in a container is not instance centric. It may not even be application centric. The best we could hope for is some -D parameter on boot to set a custom factory for commons-logging and the bundling of the commons logging jar (and our impl of their abstract factory) in each conceptual application. i.e. multiple copies of the same jars in a classloader tree. Only then can some hack/thunk through to Avalon's logging happen. It is all very dirty though.

If we
can eradicate the static nature to Commons-Logging (and most importantly its usages in Commons) we have a chance of making it work. C-L was not designed at all with IoC in mind...

They pointed out that CL can easily be used with IOC. Just don't use the static accessor and use a setLogger method.
If they can change usage patterns then great.

The fact is that it's really not feasable to pass loggers in an IOC way everywhere in bean code. I tried it with POI, and it was a mess.
With the greatest of respect, POI should not use any logging. It is a reusable comp. It is an application coders choice to use logging or not.

The fact is not that static accessors solve a need, a *real* need, that is access to a logger for fine-grained components with big hierarchies.
If we solve the need in another way, static accessors may not be needed.
Logging is a want not a need in most cases :-)

- Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to