[logback-dev] [JIRA] Updates for LOGBACK-1607: Logback does not honor logback.groovy in 1.2.10
QOS.CH (JIRA)
noreply-jira at qos.ch
Wed Jan 5 02:14:00 CET 2022
logback / LOGBACK-1607 [Open]
Logback does not honor logback.groovy in 1.2.10
==============================
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-1607
==============================
Issue created
------------------------------
Rahul Somasunderam created this issue on 05/Jan/22 2:00 AM
Summary: Logback does not honor logback.groovy in 1.2.10
Issue Type: Bug
Affects Versions: 1.2.10
Assignee: Logback dev list
Attachments: logback-bug-1.zip
Created: 05/Jan/22 2:00 AM
Priority: Major
Reporter: Rahul Somasunderam
Description:
I have this logback.groovy
{code:java}
import ch.qos.logback.classic.filter.ThresholdFilter
import static ch.qos.logback.classic.Level.*
appender("CONSOLE", ConsoleAppender) {
filter(ThresholdFilter) {
level = WARN
}
encoder(PatternLayoutEncoder) {
pattern = "%-5level - %msg%n"
}
target = "System.err"
}
logger("logback.bug", DEBUG)
root(WARN, ["CONSOLE"]) {code}
Logback doesn't appear to honor it in 1.2.10.
In 1.2.8, it works as expected.
Attached is a project that reproduces the bug. Source can be found here - [https://github.com/rahulsom/logback-bug-1]
Expected behavior: Both 1.2.8 and 1.2.10 emit this to STDERR
{code:java}
WARN - Warn
ERROR - Error {code}
Actual behavior: 1.2.8 does that. 1.2.10 emits nothing to STDERR, but emits this to STDOUT
{code:java}
16:55:40.811 [Test worker] INFO logback.bug.MyClass - Info
16:55:40.812 [Test worker] DEBUG logback.bug.MyClass - Debug
16:55:40.812 [Test worker] WARN logback.bug.MyClass - Warn
16:55:40.812 [Test worker] ERROR logback.bug.MyClass - Error {code}
==============================
This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)
More information about the logback-dev
mailing list