[LOGBack-user] explanation

Newcomb, Michael-P57487 Michael.Newcomb at gdc4s.com
Fri Sep 1 14:38:20 CEST 2006


I found some more discussion on TSS and after browsing through some of the references and reading this e-mail I think slf4j is what I'm looking for.

I especially like how it allows library developers to give the choice of logging system back to the end-developer...

Thanks again,
Michael

-----Original Message-----
From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch] On Behalf Of Ceki Gülcü
Sent: Thursday, August 31, 2006 4:50 PM
To: LOGBack users list
Subject: Re: [LOGBack-user] explanation


Hi Michael,

At 09:44 PM 8/31/2006, Newcomb, Michael-P57487 wrote:

>What is going on? I think LOGBack came from the ULogger stuff, but I am 
>not sure...

No, logback is based on several  years of work done on log4j, although closely related, logback did not come from ULogger/UGLI/SLF4J.

>Can I get a quick briefing as to what happened? Why the split form 
>Log4J, etc..?

Logback incorporates many improvements which we hope developers will find very useful. We unfortunately could not get our architectural changes into log4j. In order to keep innovating, instead of evolving log4j we had to go through a revolution in the form of logback.  The split was necessary to ensure the continued success of log4j/logback.

>All I want is a stable logging API...

SLF4J provides part of the answer.  Sebastien and I, are working on an log4j-slf4j bridge, similar to the existing jakarta commons logging
(JCL) to SLF4J  bridge. Users who currently log  through the log4j API can keep  their existing log  statements (without change).  The bridge will redirect the log4j calls to  slf4j which will in turn delegate to
another   logging  system   such   as  logback   or   log4j  or   even
java.util.logging (JUL).

Graphically, this can be represented as:

legacy log4j calls >---+
                        |
SLF4J calls        >---+---> SLF4J --> logback
                        |
legacy JCL   calls >---+



Now, if you don't like logback and prefer JUL, you can do the following:

legacy log4j calls >---+
                        |
SLF4J calls        >---+---> SLF4J --+-> JUL
                        |             |
legacy JCL   calls >---+             ^
                                      |
JUL  calls         >-----------------+


If you would prefer to stick with log4j, you can:

SLF4J calls        >---+---> SLF4J --+-> log4j
                        |             |
legacy JCL   calls >---+             ^
                                      |
log4j calls >------------------------+

Note that  in the  above diagrams, there  are no direct  logback calls because normally  one goes  through SLF4J to  log with logback.  It is actually  a little  less convenient  to log  directly  through logback
instead   of   (indirectly)   with   SLF4J.  For   example,   logbacks
documentation  always uses SLF4J.  (There are  no examples  in logback docs that use logback directly.)

In other words, SLF4J acts as a universal logging API bridging between the various logging systems. Logback  is designed to support SLF4J API from the start.

I hope this answers your questions,


>Thanks,
>Michael

--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.

_______________________________________________
Logback-user mailing list
Logback-user at qos.ch
http://qos.ch/mailman/listinfo/logback-user



More information about the Logback-user mailing list