Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1607

Logback does not honor logback.groovy in 1.2.10

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.2.10
    • None
    • None

    Description

      I have this logback.groovy

      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"]) 

      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

      WARN  - Warn
      ERROR - Error 

      Actual behavior: 1.2.8 does that. 1.2.10 emits nothing to STDERR, but emits this to STDOUT

      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 

      Attachments

        Activity

          People

            logback-dev Logback dev list
            rahulsom Rahul Somasunderam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: