u
This commit is contained in:
1 parent
e434374db5
commit
b4498e5350
31 files changed
+2007
-294
No files matched your search
@@ -17,9 +17,13 @@
|
||||
|
||||
<!-- 字段顺序:时间 级别 [traceId] [orgId/userId] method uri logger: message
|
||||
注意 logger 不补齐宽度。只有访问日志的 logger 是短名 ACCESS,
|
||||
若写成 %-40.40logger 会在它后面补 34 个空格,出现一大段无意义空白 -->
|
||||
若写成 %-40.40logger 会在它后面补 34 个空格,出现一大段无意义空白
|
||||
%logger{60}:60 足以完整显示当前全部 logger 全名(最长约 58);
|
||||
写小了会逐级缩写包名(如 {39} 会把 WorkflowExpirySweepService 压成 c.g.e.s.w.…),
|
||||
短名字如 cn.g3soft.erp.ErpApiApplication 不超阈值则原样输出,
|
||||
因此同一日志里会出现“缩写/全名”混排 -->
|
||||
<property name="CONSOLE_PATTERN"
|
||||
value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p){} %clr([%X{traceId:-}]){magenta} %clr([%X{orgId:-}/%X{userId:-}]){green} %clr(%X{method:-} %X{uri:-}){faint} %clr(%logger{39}){cyan}%clr(:){faint} %m%n%wEx"/>
|
||||
value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p){} %clr([%X{traceId:-}]){magenta} %clr([%X{orgId:-}/%X{userId:-}]){green} %clr(%X{method:-} %X{uri:-}){faint} %clr(%logger{60}){cyan}%clr(:){faint} %m%n%wEx"/>
|
||||
|
||||
<!-- 控制台:彩色文本,MDC 内联 -->
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
|
||||
Reference in new issue
Block a user