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

前端 未结 5 1529
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 04:38

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 det

5条回答
  •  心在旅途
    2020-12-04 05:05

    Not different for other answers, my framework have almost the same levels:

    1. Error: critical logical errors on application, like a database connection timeout. Things that call for a bug-fix in near future
    2. Warn: not-breaking issues, but stuff to pay attention for. Like a requested page not found
    3. Info: used in functions/methods first line, to show a procedure that has been called or a step gone ok, like a insert query done
    4. log: logic information, like a result of an if statement
    5. debug: variable contents relevant to be watched permanently

提交回复
热议问题