[logback-user] Throwable with Java 1.6 Style?

Rusty Wright rusty.wright at gmail.com
Sat Sep 13 20:30:01 CEST 2008


As a workaround perhaps you could use 
org.apache.commons.lang.exception.ExceptionUtils.getFullStackTrace(java.lang.Throwable 
throwable), which returns a String.


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.
>
> -Eric
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
>   


More information about the Logback-user mailing list