Logging levels – Logback – rule-of-thumb to assign log levels

I’m using logback in my current project.

It offers six levels of logging: TRACE DEBUG INFO WARN ERROR OFF

I’m looking for a rule of thumb to determine the log level for common activities.
For instance, if a thread is locked, should the log message be set to the debug level or the info level.
Or if a socket is being used, should its specific id be logged at the debug level or the trace level.

I will appreciate answers with more examples for each logging level.

5 Answers
5

Leave a Comment