[ERROR]JAVA Logging system failed to initialize using configuration from ‘null’‘
错误描述:
Exception in thread "main" java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.model.processor.ImplicitModelHandler - Could not create component [layout] of type [org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout] java.lang.ClassNotFoundException: org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout
ERROR in ch.qos.logback.core.pattern.parser.Compiler@40dd3977 - There is no conversion class registered for conversion word [tid]
ERROR in ch.qos.logback.core.pattern.parser.Compiler@40dd3977 - [tid] is not a valid conversion word
错误查看:
1.注意encoder和layout标签的class引用ctrl+鼠标左键是否能点击
错误解决:
maven添加
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-logback-1.x</artifactId>
<version>8.5.0</version>
</dependency>
gradle添加
api('org.apache.skywalking:apm-toolkit-logback-1.x:8.5.0')