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 0EA7F10141 for ; Sun, 26 Jan 2014 22:31:26 +0000 (UTC) Received: (qmail 62723 invoked by uid 500); 26 Jan 2014 22:31:25 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 62680 invoked by uid 500); 26 Jan 2014 22:31:25 -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 62672 invoked by uid 99); 26 Jan 2014 22:31:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jan 2014 22:31:24 +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 nicholas@nicholaswilliams.net designates 209.85.161.173 as permitted sender) Received: from [209.85.161.173] (HELO mail-gg0-f173.google.com) (209.85.161.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jan 2014 22:31:18 +0000 Received: by mail-gg0-f173.google.com with SMTP id n5so1998314ggj.18 for ; Sun, 26 Jan 2014 14:30:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nicholaswilliams.net; s=nwts; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id; bh=nRgsHJbaF1ryCCXpqYrn2qkRIidac/j3YO+GZCRX4q4=; b=k/umPEfnFU+JoBuUkY1jSPDzxhh4qpW5C92Vgrp+ZuFRm4emoXO8vE0CBHhe6vSRpO PDcVlJ5efEdLe9NA7j5ImYeGwA15sjlJWfvYVOt/ZLSww8bX2YlhUXXYE7pKLqzC4hgc aJTp7RoJtXuCfsh3db6pk4Py+ken3urmWHxD8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type:subject:date :in-reply-to:to:references:message-id; bh=nRgsHJbaF1ryCCXpqYrn2qkRIidac/j3YO+GZCRX4q4=; b=jEctKfR7b5hRNEuATMS52Nen71aJcfdGyJGfU48+JVD7gtpyv5hWRT6QU9EcOgcvNI Z05w4X2PUaBgEz1UqoUCvAuLXAn+QFTwG0FBtXSPPDXviB5m5qrkpaTKt8hzAhg18rro xt8zCnucBjFYZFaELcpeVcxz6QTqmWGIlMRMAhqnKfCxtdQrQOqr0JLv5KnrID3CRU/r ia8fOTwW3gj8OWO/rqLhAKTS0BeypEcf6qr8X0JPCNBkkGxodko/P68NZEJyg2FmETXY ns4xNifJ81n/T0LAyUJLMv9AchKM/A5xZqaMvgbYDAiRaJKP9AZ9Xd3ZjMi8SGnM475f /7hg== X-Gm-Message-State: ALoCoQmndbgrhLnKB5AvyOrMdTubyrLuYXtJyFpiLG90rO/bR+qQzHX9O3Mjcfjugts+pCb5GWJp X-Received: by 10.236.15.102 with SMTP id e66mr72806yhe.69.1390775457709; Sun, 26 Jan 2014 14:30:57 -0800 (PST) Received: from [172.16.123.8] (c-69-180-246-95.hsd1.tn.comcast.net. [69.180.246.95]) by mx.google.com with ESMTPSA id w50sm27640088yhc.15.2014.01.26.14.30.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Jan 2014 14:30:57 -0800 (PST) From: Nick Williams Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_A653AC9F-E41F-4FBA-8600-75E6B34EEC50" Subject: Re: Question about Log4jServletFilter in core. Date: Sun, 26 Jan 2014 16:31:03 -0600 In-Reply-To: <4A8E0B90-A89D-47EB-A01E-451D0BA336F4@dslextreme.com> To: "Log4J Developers List" References: <694E649E-2407-4856-BE3C-7598EAD9AD9F@nicholaswilliams.net> <57D31F46-3535-49F4-A8F4-EE7DBC1A1D4B@nicholaswilliams.net> <4A8E0B90-A89D-47EB-A01E-451D0BA336F4@dslextreme.com> Message-Id: <4481EAB3-03A2-4428-AAA1-41263FCF24EB@nicholaswilliams.net> X-Mailer: Apple Mail (2.1283) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_A653AC9F-E41F-4FBA-8600-75E6B34EEC50 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 I am. Today, in fact. N On Jan 26, 2014, at 3:43 PM, Ralph Goers wrote: > Nick, Are you working on this? >=20 > Ralph >=20 > On Jan 18, 2014, at 11:38 AM, Nicholas Williams = wrote: >=20 >> Yes. Next weekend I plan on adding a Servlet context parameter that = allows the user to disable starting Log4j automatically. That should = allow us to keep everything in one JAR while supporting both sides of = the argument.=20 >>=20 >> Nick >>=20 >> Sent from my iPhone, so please forgive brief replies and frequent = typos >>=20 >> On Jan 18, 2014, at 10:54, Gary Gregory = wrote: >>=20 >>> On Sat, Jan 18, 2014 at 12:35 PM, Ralph Goers = wrote: >>> I=92ve always had reservations about the servlet 3.0 automatic = configuration because if the log4j jar is present it can=92t be disabled = or be modified by the end user. We=92ve had some issues with Spring = initialization and 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. >>>=20 >>> 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. >>>=20 >>> For me, the fewer jars, the better. Can't this be configured somehow = without having to do more jar juggling? >>>=20 >>> Gary >>> =20 >>>=20 >>> Ralph >>>=20 >>> On Jan 17, 2014, at 8:25 PM, Nick Williams = wrote: >>>=20 >>>> 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 web app. >>>>=20 >>>> 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. >>>>=20 >>>> Nick >>>>=20 >>>> On Jan 17, 2014, at 10:17 PM, Matt Sicker wrote: >>>>=20 >>>>> Now I'm not sure if I'm interpreting this correctly, but init() = clears the 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. >>>>>=20 >>>>> --=20 >>>>> Matt Sicker >>>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>> --=20 >>> E-Mail: garydgregory@gmail.com | ggregory@apache.org=20 >>> Java Persistence with Hibernate, Second Edition >>> JUnit in Action, Second Edition >>> Spring Batch in Action >>> Blog: http://garygregory.wordpress.com=20 >>> Home: http://garygregory.com/ >>> Tweet! http://twitter.com/GaryGregory >=20 --Apple-Mail=_A653AC9F-E41F-4FBA-8600-75E6B34EEC50 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 I am. = Today, in fact.

N

On Jan = 26, 2014, at 3:43 PM, Ralph Goers wrote:

Nick, Are you working on = this?

Ralph

On = Jan 18, 2014, at 11:38 AM, Nicholas Williams <nicholas@nicholaswilliams.ne= t> wrote:

Yes. Next weekend I plan on = adding a Servlet context parameter that allows the user to disable = starting Log4j automatically. That should allow us to keep everything in = one JAR while supporting both sides of the = argument. 

Nick

Sent from my = iPhone, so please forgive brief replies and frequent = typos

On Jan 18, 2014, at 10:54, Gary Gregory <garydgregory@gmail.com> = wrote:

On Sat, Jan 18, 2014 at = 12:35 PM, Ralph Goers <ralph.goers@dslextreme.com> wrote:
I=92ve always had reservations about = the servlet 3.0 automatic configuration because if the log4j jar is = present it can=92t be disabled or be modified by the end user. We=92ve = had some issues with Spring initialization and 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 <nicholas@nicholaswilliams.net> 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 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 = 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 the = 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 <boards@gmail.com>





--
=


= --Apple-Mail=_A653AC9F-E41F-4FBA-8600-75E6B34EEC50--