[logback-user] Throwable with Java 1.6 Style?

Ceki Gulcu listid at qos.ch
Fri Sep 12 20:47:22 CEST 2008


Eric Faden wrote:
> Why is there no way to do something like...
> 
> logger.error("blah blah {} blah", exception, object);
> 
> It seems that the only way to pass that in to the logger is to use
> 
> if (logger.isErrorEnabled()) logger.error("blah blah " + 
> object.toString() + " blah", e);
> 
> or am I mistaken?  It seems that this would be a useful function to make 
> available.

No, you are right. Blame the SLF4J API. Those morons!

> -Eric

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the Logback-user mailing list