Skip to content

Allow multiple Log4jServletContextListener registrations #1784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

ppkarwasz
Copy link
Contributor

This PR allows the user to declare a Log4jServletContextListener explicitly in a web.xml descriptor (additionally to the one installed by Log4jServletContainerListener).

Due to the way the Servlet API works, the only way for Log4jServletContextListener to shutdown the context after all other listeners is to declare it explicitly in a web.xml descriptor.

Closes #1782.

@ppkarwasz
Copy link
Contributor Author

This PR was tested on a simple Servlet API project.

@ppkarwasz ppkarwasz added this to the 2.21.0 milestone Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shutdown of Log4j2 initialized via Log4jServletContainerInitializer happens first not last
1 participant