[英]Spring Boot : "Cannot set level: INFO, ERROR for 'org.springframework'" using logback-spring.xml
My application is running in V 1.5.10.RELEASE, to trace my logs in files, i was basically used the logback-spring.xml我的应用程序在 V 1.5.10.RELEASE 中运行,为了跟踪我的日志文件,我基本上使用了logback-spring.xml
When the handler catch and throw an exception of type "message": "java.lang.NullPointerException" the error was badly reassembled :当处理程序捕获并抛出类型为"message": "java.lang.NullPointerException"的异常时,错误被严重重组:
{
"timestamp": "2019-11-12T10:59:58.124Z",
"timeZone": "Europe/Paris",
"level": "ERROR",
"env": "PRD",
"laas_apcode": "xxxx",
"laas_type": "service_logs",
"laas_retention": "quarter",
"laas_token": "0000000x",
"organizationalEntity": "xxxx",
"apName": "xxx-xxxx",
"apVersion": "0.4.9-1911",
"nodeName": "xxxx",
"labels": {
"userId": "",
"sourceIp": "",
"layer": "",
"rootCorrelationId": "",
"correlationId": "",
"parentCorrelationId": ""
},
"loggerName": "o.s.b.logging.LoggingApplicationListener",
"message": "Cannot set level: INFO, ERROR for 'org.springframework'",
"exception": {
"stackTrace": ""
}
}
in my application.yml i set this :在我的 application.yml 中我设置了这个:
# Logging Configurations
logging:
level:
ROOT: WARN
org.springframework: INFO, ERROR
setting multiple levels on one package is not allowed不允许在一个包上设置多个级别
# Logging Configurations
logging:
level:
ROOT: WARN
org.springframework: INFO
this will show all message of level INFO
, WARN
, ERROR
for package org.springframework
这将显示包
org.springframework
的级别INFO
、 WARN
、 ERROR
所有消息
and all message of level WARN
, ERROR
for package your.package
以及
WARN
级别的所有消息,包your.package
ERROR
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.