[logback-user] Log4j to Logback migration, logback.xml question

Ralph Goers rgoers at apache.org
Tue Feb 8 02:12:28 CET 2011


In SLF4J org.slf4j.Logger is the interface applications code to.  SLF4J is the API.  If you want to change the interface you aren't going to be able to use SLF4J.

The only good way to extend Logback's Logger is to use the LoggerWrapper found in slf4j-ext, much as XLogger does.  If you want to fully implement SLF4J's Logger interface than you essentially won't be using Logback.

Ralph

On Feb 7, 2011, at 11:15 AM, Fabio Erculiani wrote:

> Hi there,
> I'm migrating my stuff from log4j to logback and I've gotten to the
> log4j.xml -> logback.xml porting.
> Besides not having a .dtd makes the work quite hard, I am trying to
> understand one thing:
> In log4j I had <category> supporting the class= attribute (while
> <logger>, which would be its replacement from my understanding,
> doesn't).
> Is there anything similar in logback.xml?
> I wrote a custom Logger (implementing Logger interface) and I would
> like to tell the logger to use it instead of org.slf4j.Logger.
> 
> Thanks a lot.
> -- 
> Fabio Erculiani
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user



More information about the Logback-user mailing list