[logback-user] Configuring Exception logging

Daniel Serodio (lists) daniel.lists at mandic.com.br
Fri Jul 12 21:49:01 CEST 2013


Suppose I have this Java code:

try {
     // ...
} catch (Exception ex) {
     logger.error("Something went wrong", ex);
}

I want to choose at runtime if a specific Logger should log the 
exception's stacktrace or just its message. Is this possible with Logback?

Thanks in advance,
Daniel Serodio


More information about the Logback-user mailing list