在为Logback附加器指定实现类时,是否可以使用变量替换?例如,
<appender name="LOGFILE" class="${LOGFILE_APPENDER_CLASS}">
在如上指定时,Logback似乎会尝试加载名称为"${LOGFILE_APPENDER_CLASS}“的类。即不进行变量替换!
21:17:11,331 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [${LO
我正在使用logback登录我的应用程序,每次我运行应用程序时,我都会不断地收到以下警告。当我运行单元测试时,每个类都会打印出来!
SLF4J: The following set of substitute loggers may have been accessed
SLF4J: during the initialization phase. Logging calls during this
SLF4J: phase were not honored. However, subsequent logging calls to these
SLF4J: loggers will work
尝试将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
我工作的应用程序将被创建为jar文件,并通过命令行运行它。不涉及应用服务器。当我运行下面的jar文件时,控制台上会打印来自logback的信息。如何从logback包中禁止所有日志记录
13:46:30,534 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
13:46:30,534 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource