[logback-user] Exception logging

c_inconnu2 c_inconnu2 at yahoo.fr
Sat Nov 10 19:02:34 CET 2007


First, I was looking for a more recent log framework than log4j and I 
just discovered logback : thanks for this great piece of software. I am 
using it for a couple of hours now and I have a question about usage :

With log4j i had :
logger.error("Something went wrong because " + someReason, exception);

But with logback (SLF4J) I have to keep this since the signature is :
void org.slf4j.Logger.error(String msg, Throwable t)

I would have thought that something like below had existed :
void org.slf4j.Logger.error(String msg, Throwable t, Object[])

so i would have written
logger.error("Something went wrong because {}", exception, someReason);

Any advice ? Thanks


More information about the Logback-user mailing list