Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D9E210127 for ; Sat, 18 Jan 2014 18:55:21 +0000 (UTC) Received: (qmail 44370 invoked by uid 500); 18 Jan 2014 18:55:20 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 44279 invoked by uid 500); 18 Jan 2014 18:55:20 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 44271 invoked by uid 99); 18 Jan 2014 18:55:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jan 2014 18:55:20 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of garydgregory@gmail.com designates 209.85.214.50 as permitted sender) Received: from [209.85.214.50] (HELO mail-bk0-f50.google.com) (209.85.214.50) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jan 2014 18:55:13 +0000 Received: by mail-bk0-f50.google.com with SMTP id w16so1438122bkz.9 for ; Sat, 18 Jan 2014 10:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=37AAU4RFXzd7if4S5eKuhPXvMPXtNKeNTo7gwd91IOM=; b=bfUGCyVvbaxiRnSVGznkJmS1gIPSiEEjeD1xI0bA57i+3ENKPsKNG6IMZjVEAtjOyw UowDMKlDJuu+xFQax+FgZz/E/bi4Ah91KVYyS3XouQRntcyOPkVO6s2apmP6TotGBwnP jcVkmJThTeICIGPhTwpWREhF3lmDYbtVxAmCKafyyPDMRpT3pBRtB0oDaw/PjAz5g1vv U1uVmTnOjldOa1h4l2LRs0tH+m+KMfr1pZVI0dK5nuC9Czi5uA0fGzF5cJhw0sFY35ex u/qduCaq34wE1QnYDSYAhJt70VGUm7ohY0XIS9MDtSaWvR9FxYZrrfcuHQraNrOxMeuD YGCw== MIME-Version: 1.0 X-Received: by 10.204.127.77 with SMTP id f13mr2189bks.95.1390071292736; Sat, 18 Jan 2014 10:54:52 -0800 (PST) Received: by 10.204.102.201 with HTTP; Sat, 18 Jan 2014 10:54:52 -0800 (PST) In-Reply-To: References: <694E649E-2407-4856-BE3C-7598EAD9AD9F@nicholaswilliams.net> Date: Sat, 18 Jan 2014 13:54:52 -0500 Message-ID: Subject: Re: Question about Log4jServletFilter in core. From: Gary Gregory To: Log4J Developers List Content-Type: multipart/alternative; boundary=001a11334e289de2bc04f04331ea X-Virus-Checked: Checked by ClamAV on apache.org --001a11334e289de2bc04f04331ea Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Jan 18, 2014 at 12:35 PM, Ralph Goers w= rote: > I=E2=80=99ve always had reservations about the servlet 3.0 automatic conf= iguration > because if the log4j jar is present it can=E2=80=99t be disabled or be mo= dified by > the end user. We=E2=80=99ve had some issues with Spring initialization an= d now > LOG4J2-452 reinforces that. I would propose that if we want to keep it > that we move the minimum amount required into its own jar so that users > have a choice as to whether it is automatically initialized. > > Am I the only one who feels this way? Frankly, this and one other issue = I > plan to work on this weekend are the only things I see as blockers for a = GA > release. > For me, the fewer jars, the better. Can't this be configured somehow without having to do more jar juggling? Gary > > Ralph > > On Jan 17, 2014, at 8:25 PM, Nick Williams > wrote: > > Filter initialization is one of the last things to happen in web app > startup. The ServletContainerInitializer sets the threads logger context = so > that web app startup procedures can use it. The filter's init() method > clears it near the end of startup so that it doesn't bleed into another w= eb > app. > > Then, on web apps shutdown, destruction of filters is one of the first > things to happen. The filter's destroy() sets the logger context so that > the web app shutdown procedures can use it. > > Nick > > On Jan 17, 2014, at 10:17 PM, Matt Sicker wrote: > > Now I'm not sure if I'm interpreting this correctly, but init() clears th= e > current thread's logger context, and destroy() sets it. What's up with > this? Especially since it just gets set and cleared in the doFilter() bit= . > > -- > Matt Sicker > > > > --=20 E-Mail: garydgregory@gmail.com | ggregory@apache.org Java Persistence with Hibernate, Second Edition JUnit in Action, Second Edition Spring Batch in Action Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory --001a11334e289de2bc04f04331ea Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On S= at, Jan 18, 2014 at 12:35 PM, Ralph Goers <ralph.goers@dslextreme= .com> wrote:
I= =E2=80=99ve always had reservations about the servlet 3.0 automatic configu= ration because if the log4j jar is present it can=E2=80=99t be disabled or = be modified by the end user. We=E2=80=99ve had some issues with Spring init= ialization and now LOG4J2-452 reinforces that. =C2=A0I would propose that i= f we want to keep it that we move the minimum amount required into its own = jar so that users have a choice as to whether it is automatically initializ= ed.

Am I the only one who feels this way? =C2=A0Frankly, th= is and one other issue I plan to work on this weekend are the only things I= see as blockers for a GA release.

<= div> For me, the fewer jars, the better. Can't this be configured somehow wi= thout having to do more jar juggling?

Gary
=C2=A0
<= /div>

Ralph

On Jan 17, 2014, at 8:25 PM, Nick Williams <nicholas@nicholaswilliams.net<= /a>> wrote:

Filter in= itialization is one of the last things to happen in web app startup. The Se= rvletContainerInitializer sets the threads logger context so that web app s= tartup procedures can use it. The filter's init() method clears it near= the end of startup so that it doesn't bleed into another web app.

Then, on web apps shutdown, destruction of filters is one of= the first things to happen. The filter's destroy() sets the logger con= text so that the web app shutdown procedures can use it.

Nick




--
--001a11334e289de2bc04f04331ea--