Log4j 2
  1. Log4j 2
  2. LOG4J2-65

Variables are not supported on status attribute a NullPointerException occurs if a variable is specified on the root log level.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-alpha1
    • Fix Version/s: 2.0-alpha2
    • Component/s: Core
    • Labels:
      None

      Description

      The following configuration causes a NullPointerException and the message "null object returned for root"

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration status="$

      {sys:log.level}

      " strict="false" name="DSI" packages="com.terradue.dsione">
      <appenders>
      <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="[%-5level] %msg%n" />
      </Console>
      </appenders>

      <loggers>
      <root level="$

      {sys:log.level}

      ">
      <appender-ref ref="Console" />
      </root>
      </loggers>
      </configuration>

        Activity

        Hide
        Ralph Goers added a comment -

        Variables are now supported on the status attribute. Fixed the null pointer exception when using a variable on the Log level.

        Show
        Ralph Goers added a comment - Variables are now supported on the status attribute. Fixed the null pointer exception when using a variable on the Log level.

          People

          • Assignee:
            Ralph Goers
            Reporter:
            Ralph Goers
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development