[ https://issues.apache.org/jira/browse/LOG4J2-946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14297066#comment-14297066 ]
Gary Gregory edited comment on LOG4J2-946 at 1/29/15 4:24 PM: -------------------------------------------------------------- The docs are wrong, it was not updated to the latest version of {{org.apache.logging.log4j.web.TestAsyncServlet}} (see git). Just change {{Log4jWebLifeCycle}} to {{Log4jWebSupport}}: {code:java} final Log4jWebSupport webLifeCycle = WebLoggerContextUtils.getWebLifeCycle(TestAsyncServlet.this.getServletContext()); {code} Gary was (Author: garydgregory): The docs are wrong, it was not updated to the latest version of {{org.apache.logging.log4j.web.TestAsyncServlet}} (see git). Just change {{Log4jWebLifeCycle }} to {{Log4jWebSupport}}: {code:java} final Log4jWebSupport webLifeCycle = WebLoggerContextUtils.getWebLifeCycle(TestAsyncServlet.this.getServletContext()); {code} Gary > [docs] Using Log4j 2 in Web Applications: Update example (Log4jWebLifeCycle > is not visible) > ------------------------------------------------------------------------------------------- > > Key: LOG4J2-946 > URL: https://issues.apache.org/jira/browse/LOG4J2-946 > Project: Log4j 2 > Issue Type: Bug > Components: Documentation > Affects Versions: 2.0.2 > Reporter: artemonster > Fix For: 2.2 > > > On the http://logging.apache.org/log4j/2.x/manual/webapp.html page you > mention following code snippet: > {code} > final Log4jWebLifeCycle webLifeCycle = > WebLoggerContextUtils.getWebLifeCycle(TestAsyncServlet.this.getServletContext()); > {code} > The problem is, Log4jWebLifeCycle is package-private and you can't use it. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org