logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: What happens if I do NOT add the listener and filter in a servlet 2.5 webapp?
Date Tue, 06 Sep 2016 15:41:02 GMT
It's to automatically shut down the LoggerContext when you undeploy a
webapp. If you don't undeploy or redeploy webapps, you don't really need to
use it.

On 6 September 2016 at 10:22, KARR, DAVID <dk068x@att.com> wrote:

> I'm looking at running a webapp in a version of WebLogic that appears to
> only support (at maximum) the Servlet 2.5 spec.  The Log4j2 docs talk about
> using Log4j2 in a Servlet 2.5 container, at https://logging.apache.org/
> log4j/2.x/manual/webapp.html#Servlet-2.5 .
>
> This page says the following:
> "If you are using Log4j in a Servlet 2.5 web application, or if you have
> disabled auto-initialization with the isLog4jAutoInitializationDisabled
> context parameter, you must configure the Log4jServletContextListener and
> Log4jServletFilter in the deployment descriptor or programmatically."
>
> Nowhere does it say WHY this MUST be done, what this causes when you do
> it, or even what the consequences are if you do not do this (ok, probably
> same as the first point).
>
> I have a feeling the main reason these are required is not for startup,
> but for shutdown, but again, I see no clear information either way.
>
> I ended up deploying this app to that container, without adding these, and
> I saw no obvious symptoms.
>
> In addition to the above questions, I need to understand what the impact
> is, if any, to having this listener and filter running in a Servlet
> container newer than 2.5.  I would guess it would cause no harm, but again,
> no information means no information.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message