Sankalp created LOG4J2-3251:
-------------------------------

             Summary: Weblookup is not working if old loggercontext is removed 
and tried to initialize loggerContext using Configurator.initialize
                 Key: LOG4J2-3251
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3251
             Project: Log4j 2
          Issue Type: Bug
          Components: Configurators
    Affects Versions: 2.16.0, 2.15.0
            Reporter: Sankalp
         Attachments: console.log

In a web application, I am first creating a loggerContext and it log4j.xml  has 
${web:rootDir} for lookup. It is resolved as expected. 

I am removing the older loggerContext and using 
Configurator.initialize(contextName, classlodaer, filePaths, context). This API 
fails and I can observe that inside weblookup it is NOT getting servletContext. 
Below API returns null. 

*ServletContext ctx = WebLoggerContextUtils.getServletContext();*



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to