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

Can't set monitorInterval for composite XML configuration.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9.1
    • 2.10.0
    • Core
    • None

    Description

      When trying to combine a composite configuration with automatic reload, it fails to reload.

      When an XmlConfiguration is reloaded it calls XmlConfiguration.reconfigure() which sets the rootElement field, and everything is fine.

      When a CompositeConfiguration is reloaded, it doesn't call reconfigure() on the XmlConfigurations. This means when it tries to start the config XmlConfiguration.setup() is called and rootElement is null, resulting in an error message "No logging configuration".

      End result is the config isn't loaded and there's no more logging.

      To reproduce, it doesn't matter what is in the configurations. Just need at least 2 XML configs in the log4j.configurationFile property and the monitorInterval set.

      (Ps. my first ticket)

      Attachments

        1. patch_2068.diff
          2 kB
          Robert Haycock

        Activity

          People

            Unassigned Unassigned
            tedtrippin Robert Haycock
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: