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

Merging configurations fail with an NPE when comparing Nodes with different attributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.7
    • Configurators
    • None

    Description

      When you pass two configurations and there are different Nodes in the Root logger a NPE gets thrown.

      Example stub configuration 1

      <Loggers>
        <Root level="...">
          <AppenderRef ref="STDOUT">
          <Property name="hostname">server1</Property>
        </Root>
      </Loggers>
      

      Example stub configuration 2

      <Loggers>
        <Root level="...">
          <AppenderRef ref="STDOUT">
          <AppenderRef ref="File">
        </Root>
      </Loggers>
      

      Failure happens because DefaultMergeStrategy.isSameName() and isSameReference() calls get() without checking for null.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              leonj1 Jose Leon
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: