ramanathan1504 commented on code in PR #4408:
URL: https://github.com/apache/logging-log4j2/pull/4408#discussion_r4421958736


##########
src/site/antora/modules/ROOT/pages/jakarta.adoc:
##########
@@ -98,6 +104,12 @@ To do it, you must create a `web.xml` descriptor and add 
the `Log4jServletContex
 ----
 include::example$manual/webapp/web.xml[tag=context-listener]
 ----
+
+Context listeners are destroyed in reverse initialization order.
+Registering the Log4j listener first allows other listeners to log during 
their `contextDestroyed()` callbacks before Log4j shuts down.
+
+Since Log4j 2.21.0, this works alongside automatic listener registration;
+you do not need to set `isLog4jAutoShutdownDisabled` to `true`.

Review Comment:
   The WARNING block just above already says to register 
`Log4jServletContextListener` first so it runs last at shutdown.
   
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to