You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Piotr Karwasz (Jira)" <ji...@apache.org> on 2022/09/11 13:38:00 UTC
[jira] [Commented] (LOG4J2-708) Servlet filter claims to support async but doesn't use AsyncContext
[ https://issues.apache.org/jira/browse/LOG4J2-708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17602868#comment-17602868 ]
Piotr Karwasz commented on LOG4J2-708:
--------------------------------------
Hi [~mattsicker],
In an effort to clean up some very old open issues, I created [PR #1046|https://github.com/apache/logging-log4j2/pull/1046], which should solve the main problem of the {{Log4jServletFilter}}: it is executed only once per request, while it should run (once) on any thread were the request is served. This mainly applies to all async dispatches.
Beyond that I don't see any purpose in the {{Log4jServletFilter}} other than a dirty hack to make {{WebLookup}} and {{BasicContextSelector}} work. It should probably be remove from {{master}}.
> Servlet filter claims to support async but doesn't use AsyncContext
> -------------------------------------------------------------------
>
> Key: LOG4J2-708
> URL: https://issues.apache.org/jira/browse/LOG4J2-708
> Project: Log4j 2
> Issue Type: Question
> Affects Versions: 2.0-rc2
> Environment: Servlet 3.0 (Tomcat 7, Jetty 8) or higher
> Reporter: Matt Sicker
> Assignee: Matt Sicker
> Priority: Major
>
> In log4j-web, when the ServletContainerInitializer adds the Log4j Filter, it sets the asyncSupported property to true. However, it's still a synchronous Filter.
> A separate asynchronous Filter should be made for Servlet 3.x support that doesn't break Servlet 2.x.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)