lundi 23 janvier 2017

Logback/SLF4J - is there a configuration setting to prevent a stack trace being printed out?

In my app code I have a situation where I want an Exception to be fully printed out with the stack trace and everything.

In my testing code for this situation, when I deliberately doThrow(), to test the handling of this Exception, I want still to log to error, but without the stack trace, partly to prevent cluttering the log, partly to prevent the testing code wasting time printing a stack trace I have no need of.

Is there a way I can do this in my logback-test.xml?

Aucun commentaire:

Enregistrer un commentaire