[logback-dev] [JIRA] Updates for LOGBACK-1621: no applicable action for [root], current ElementPath is [[configuration][root]]
QOS.CH (JIRA)
noreply-jira at qos.ch
Sat Mar 12 07:42:00 CET 2022
logback / LOGBACK-1621 [Open]
no applicable action for [root], current ElementPath is [[configuration][root]]
==============================
Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.
View or comment on issue using this link
https://jira.qos.ch/browse/LOGBACK-1621
==============================
Issue created
------------------------------
Chiiwen Liou created this issue on 12/Mar/22 7:29 AM
Summary: no applicable action for [root], current ElementPath is [[configuration][root]]
Issue Type: Bug
Affects Versions: 1.2.11
Assignee: Logback dev list
Components: logback-access
Created: 12/Mar/22 7:29 AM
Environment:
Windows 11:
Java 8
logback 1.2.11
slf4j 1.7.36
Labels: configuration
Priority: Minor
Reporter: Chiiwen Liou
Description:
java code with logback.xml failed withFailed java code with logback.xml failed with
22:01:51,235 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter at 14:22 - no applicable action for [root], current ElementPath is [[configuration][root]]
22:01:51,235 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter at 15:32 - no applicable action for [appender-ref], current ElementPath is [[configuration][root][appender-ref]]
If I move logback to classpath and java code run fine with
final Logger logger = LoggerFactory.getLogger(LogbackExample.class);
logger.info("Hello World");
java code:-----
final Logger logger = LoggerFactory.getLogger(LogbackExample.class);
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
JoranConfigurator configurator = new JoranConfigurator();
lc.reset();
configurator.setContext(lc);
configurator.doConfigure("lib/logback.xml");
logger.info("Hello World");
logback.xml:-----
<configuration scan="true" scanPeriod="60 seconds" debug="true"><configuration scan="true" scanPeriod="60 seconds" debug="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d\\{HH:mm:ss.SSS} [%thread] %-5level %logger\\{5} - %msg%n</pattern>
</encoder>
</appender>
<root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
==============================
This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)
More information about the logback-dev
mailing list