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

ClassLoaderContextSelector logging WARN messages

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta9
    • Fix Version/s: None
    • Component/s: Configurators
    • Labels:
      None

      Description

      I am getting the following WARN message everytime my application logs something.


      WARN locateContext called with URI null. Existing LoggerContext has URI classpath:log4j/local.log4j.xml

      I traced this to ClassLoaderContextSelector -

      if (ctx != null) {
                  if (ctx.getConfigLocation() == null && configLocation != null) {
                      LOGGER.debug("Setting configuration to {}", configLocation);
                      ctx.setConfigLocation(configLocation);
                  } else if (ctx.getConfigLocation() != null && !ctx.getConfigLocation().equals(configLocation)) {
                      LOGGER.warn("locateContext called with URI {}. Existing LoggerContext has URI {}", configLocation,
                          ctx.getConfigLocation());
                  }
                  return ctx;
              }
      

      Ralph Goers Ralph Goers Why are we logging these WARN messages?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ralph.goers@dslextreme.com Ralph Goers
                Reporter:
                abhinav.shah@gmail.com Abhinav Shah
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: