cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Grobmeier" <>
Subject Re: cayenne library changes log level in struts2
Date Tue, 03 Dec 2013 17:39:48 GMT
On 3 Dec 2013, at 15:59, Mike Kienenberger wrote:

> On Tue, Dec 3, 2013 at 9:43 AM, Christian Grobmeier 
> <> wrote:
>> With slf4j/log4j2 you can choose your logging api at your own will 
>> too.
>> Personally I consider Commons Logging a risk and would not add it 
>> into my
>> projects today.
>> Its not well maintained and future developments of the other 
>> frameworks will
>> most likely not look that much into Commons Logging.
>> But well, I am biased on that.
> Yes, I'm very much aware that you are trolling and/or proselytizing as
> the case may be :)   But it's a good topic to revisit occasionally.

I hope this was rethoric and you don't consider my emails trollish?
Thats not the intention. I am involved in Apache Commons and in Apache 
Logging and
logging is some kind of a natural interest. If you feel that my mails
are trolling this list, let me know and I stop my blabber.

> If Cayenne were to log directly to the log4j api, that would force all
> of our end-users to use log4j, at least to the point to reconfigured
> log4j to log to something else.

Now you force them to have commons-logging which almost nobody else 

Furthermore you force users to exclude the commons-logging.jar manually
when they want to drive anything over slf4j.

This would be the case with slf4j/log4j2 too - but it is more likely 
that those
are used in real life projects rather than commons-logging. Esp slf4j of 
log4j2 has not spread so far.

> However, as you've already pointed out, if we log against the commons
> logging api, then no one even needs to use the actual commons logging
> implementation.   They can use the log4j2 bridge.  They can use the
> slf4j bridge.   I don't know much about logback, but my guess is that
> they have a bridge as well.

If you care about the bad performance of JCL:

then you need to exclude commons-logging.

If you would use slf4j, you can use jcl, log4j1, log4j2, logback even 
jul (with some performance problems).
If you use log4j2 you can use the same.

If you use JCL you can use log4j1, log4j2, slf4j and logback. But no 

The difference is that logging framework vendors provide support for 
JCL, but JCL itself does not.
If logging framework vendors decide to drop JCL support, its simply 

JCL for me is definitely not the best solution, its one of the worst.

> Commons logging as an logging implementation may not make much sense
> today, but using the commons logging api provides the maximum
> flexibility as far as I can tell.

No, it misses lot of modern features in its API, like markers.
I wrote a blog post bout it if you are interested:

However ASF is a do-ocracy. If you *would* consider a change, I might 
submit a patch.
But this will take a while - i have promised a lot of these patches 
already :-)



View raw message