尝试将sentry(logback)集成到spring应用程序中,但遇到了此错误
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@32:18 - no applicable action for [encoder], current ElementPath is [[configuration][appender][encoder]]
ERROR in ch.qos.logback.core.jo
我有项目com.samedhi/base,它有一个logback.xml文件,项目com.samedhi/derive也有一个logback.xml文件。项目“派生”依赖于“base”。当我在‘派生’上使用“”时,我会收到以下警告。
....
15:34:30,066 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
15:34:30,066 |-INFO in ch.qos.logback.classic.LoggerContext[defaul
默认情况下,Spring转储日志系统配置(例如,设置了log4j的-Dlog4j.debug,与logback相同),这意味着每个应用程序在读取配置文件本身时都以冗长而非超级有用的消息开头:
16:03:08,167 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
16:03:08,167 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resour
我希望为我的非托管扩展启用日志记录,到目前为止,它也很好(至少在我的单元测试中)。所以我写了一个logback.xml,并将它包含在我的包中。当我使用动态创建的db运行单元测试(功能测试)时,一切正常工作,也就是说,我的日志定义得到了识别,日志工作也如愿以偿。以下是日志的摘录,您可以看到不同的日志将被注册:
12:07:56,597 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/home/me/git/myproject/target/classe
我正在尝试在slf4j中使用logback设置控制台记录器。我的logback配置如下:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder class