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

log4j2 configuration reloading does not work when log4j xml is not in classpath

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0-beta2
    • 2.0-beta3
    • None
    • None

    Description

      I am testing log4j2 on JBOSS EAP 5.0. I have copied log4j2.xml in JBOSS_HOME\server\default\conf and add the system property in eclipse server launch configuration as below:

      -Dlog4j.configurationFile=C:\softwares\jboss-eap-5.0.1\jboss-eap-5.0\jboss-as\server\default\conf\log4j2.xml

      if i modify log4j.xml and change log level etc. those changes are not picked up by log4j. below is my log4j2.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration name="log4j2-Test" status="DEBUG" monitorInterval="5" strict="true">
      <appenders>
      <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="%d

      {HH:mm:ss.SSS}

      [%t] %-5level %logger

      {36}

      - %msg%n"/>
      </Console>
      </appenders>
      <loggers>
      <logger name="com.xyz" level="DEBUG" >
      <appender-ref ref="Console"/>
      </logger>
      <root level="error">
      <appender-ref ref="Console"/>
      </root>
      </loggers>
      </configuration>

      Attachments

        Activity

          People

            rgoers Ralph Goers
            anawasthi Anand Awasthi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: