logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: Log4j 2 and Commons Logging
Date Sat, 19 Jul 2014 22:25:56 GMT
I would like to see Log4j 2 being used as a replacement for Commons
Logging, actually. During ApacheCon earlier this year, I spoke with a few
Tomcat developers, and it turns out that our LoggerContext design is
actually a lot more powerful than anything Commons Logging et al. can do.
Being able to support multiple logging configurations at the same time
without them affecting each other is a super useful feature for container
applications. Otherwise, these containers tend to have some sort of
extended loggers or a different framework entirely (e.g., JULI in Tomcat)
in order to support multiple configurations.

I'd like to see microbenchmarks, too, if there is any performance reason to
dissuade usage of Commons Logging. I hope that we can still get similar
performance when using the SLF4J API as the frontend to log4j-core, though,
as that will create immediate benefits for tons of programs and libraries.

On 18 July 2014 18:34, Remko Popma <remko.popma@gmail.com> wrote:

> I thought the log4j-to-slf4j adapter was very forward thinking. It is a
> smart idea, and reminded me of Microsoft Excel's backward compatibility
> with Lotus-123 when they entered the market that was completely dominated
> by Lotus-123. (Lotus who? Exactly!)
> We could add some microbenchmarks to the perf module to see what penalty
> (if any) users would pay when logging to log4j2 via the various APIs:
> SLF4J, Commons Logging, Log4j-1.2 and the native Log4j2 API.
> On Sat, Jul 19, 2014 at 7:54 AM, Ralph Goers <ralph.goers@dslextreme.com>
> wrote:
>> I thought about that, but it seemed more prudent to try to get people
>> using other frameworks to consolidate on using Log4j and not the other way
>> around.
>> Ralph
>> On Jul 18, 2014, at 1:40 PM, Matt Sicker <boards@gmail.com> wrote:
>> But what if I'm still using Java 1.2? :P
>> On 18 July 2014 15:37, Ralph Goers <ralph.goers@dslextreme.com> wrote:
>>> Commons Logging’s purpose is to provide a common API that can sit in
>>> front of any logging implementation. The Log4j API isn’t intended for that.
>>>  We have bridges that allow applications written using other APIs to use
>>> Log4j 2 as the implementation.  We do have a bridge from the Log4j 2 API to
>>> SLF4J, but that is the only one.  As such, I don’t see it as a replacement
>>> - at least not yet.
>>> Ralph
>>> On Jul 18, 2014, at 1:23 PM, Gary Gregory <garydgregory@gmail.com>
>>> wrote:
>>> Should we consider proposing that, at least conceptually, Commons
>>> Logging be deprecated in favor of Log4j 2?
>>> Gary
>>> --
>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>> Java Persistence with Hibernate, Second Edition
>>> <http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>> --
>> Matt Sicker <boards@gmail.com>

Matt Sicker <boards@gmail.com>

View raw message