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

AsyncLogger without specifying a level always uses ERROR

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.11.0
    • Fix Version/s: 3.0.0
    • Component/s: Configurators
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: