That sounds like a feature you should bake into your codebase, instead of
pushing it to logback.
-----Original Message-----
From: "Håvard Ottestad" <[email protected]>
Sent: 31/12/2017 18:30
To: "[email protected]" <[email protected]>
Subject: [logback-user] Delaying debug logs until an error occurs
Hi,
Happy new year :D
I have a question that I’m having trouble formulating.
My goal is to reduce the amount of logging in my application, but still log
debug messages when there has been an error.
I’m wondering if there is a way to have logback “save” debug messages and only
log them if an error is logged at some point later on in the same transaction.
Eg. A spring web application. The user uploads a file, and at some point in the
processing of the file an error occurs. Would be great now if the application
would print out all debug messages associated with the file upload (including
messages logged before the error), so that it would be possible to trace what
happened leading up to the error.
Having debug, info, warn and error on in production produces too many logs,
which means we can’t keep them as long as we would like. So being able to
trigger logging of previous debug messages on an error would give us a high
level of detail in our logs when we need it the most.
Cheers,
Håvard
_______________________________________________
logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user
_______________________________________________
logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user