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

ClassLoaderContextSelector logging WARN messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0-beta9
    • None
    • Configurators
    • 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@dslextreme.com ralph.goers@dslextreme.com Why are we logging these WARN messages?

      Attachments

        Issue Links

          Activity

            People

              rgoers Ralph Goers
              abhinav.shah@gmail.com Abhinav Shah
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: