java日志框架 (四) 日志相关

  1. 输出等级

This rule is at the heart of logback. It assumes that levels are ordered as follows: 

TRACE < DEBUG < INFO <  WARN < ERROR.

In a more graphic way, here is how the selection rule works. In the following table, the vertical header shows the level of the logging request, designated by p, while the horizontal header shows effective level of the logger, designated by q. The intersection of the rows (level request) and columns (effective level) is the boolean resulting from the basic selection rule.

level of 
request p

effective level q

TRACE

DEBUG

INFO

WARN

ERROR

OFF

TRACE

YES

NO

NO

NO

NO

NO

DEBUG

YES

YES

NO

NO

NO

NO

INFO

YES

YES

YES

NO

NO

NO

WARN

YES

YES

YES

YES

NO

NO

ERROR

YES

YES

YES

YES

YES

NO

 

posted @ 2019-04-29 15:48  glpa  阅读(77)  评论(0编辑  收藏  举报