Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2321

AsyncLogger without specifying a level always uses ERROR

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.11.0
    • 3.0.0
    • Configurators
    • None

    Description

      An AsyncLogger definitions without a level defined always have "ERROR" level set, where Logger definitions defer to the parent config, error is only set for the root logger.

      For example:

      <?xml version="1.0" encoding="UTF-8"?>
      <Configuration>
          <Appenders>
              <Null name="null"/>
          </Appenders>
          <Loggers>
              <AsyncLogger name="com.foo" />
              <AsyncRoot level="trace">
                  <AppenderRef ref="null" />
              </AsyncRoot>
          </Loggers>
      </Configuration>

      Logger "com.foo" level should be trace, inherited from the root logger, however it will currently be error.
      The same config using "Logger" and "Root" rather than their asynchronous counterparts will produce the expected behavior.

       

      Attachments

        Issue Links

          Activity

            People

              ckozak Carter Kozak
              ckozak Carter Kozak
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: