Return-Path: X-Original-To: apmail-logging-log4j-user-archive@www.apache.org Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37995100EF for ; Tue, 25 Aug 2015 23:37:30 +0000 (UTC) Received: (qmail 55341 invoked by uid 500); 25 Aug 2015 23:37:29 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 55283 invoked by uid 500); 25 Aug 2015 23:37:29 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 55272 invoked by uid 99); 25 Aug 2015 23:37:29 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2015 23:37:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 68AD71AAD84 for ; Tue, 25 Aug 2015 23:37:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3 X-Spam-Level: *** X-Spam-Status: No, score=3 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id hXQ9GtwKVohc for ; Tue, 25 Aug 2015 23:37:18 +0000 (UTC) Received: from COL004-OMC3S17.hotmail.com (col004-omc3s17.hotmail.com [65.55.34.156]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 47E3825573 for ; Tue, 25 Aug 2015 23:37:18 +0000 (UTC) Received: from COL126-W4 ([65.55.34.135]) by COL004-OMC3S17.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 25 Aug 2015 16:37:18 -0700 X-TMN: [FLl/m8FDl6kkFlRUl/7CjGOfW1Lqazqm] X-Originating-Email: [nickdu@msn.com] Message-ID: Content-Type: multipart/alternative; boundary="_a1a0f667-d8b9-484f-b75a-55521637d2a4_" From: Nicholas Duane To: Log4J Users List Subject: RE: redefining existing levels? Date: Tue, 25 Aug 2015 19:37:17 -0400 Importance: Normal In-Reply-To: References: ,,,,,,,,, MIME-Version: 1.0 X-OriginalArrivalTime: 25 Aug 2015 23:37:18.0046 (UTC) FILETIME=[FAD68FE0:01D0DF8E] --_a1a0f667-d8b9-484f-b75a-55521637d2a4_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable No. Redefining existing levels is to help ensure we have "24x7" logging al= ways on. So even if someone sets the level to "OFF" we still get INFO and = above. Basically we'll have levels higher (or lower based on what platform= we're talking about) than INFO OFF by default and only turn them on when n= eeded. =20 Thanks=2C Nick =20 > Date: Wed=2C 26 Aug 2015 08:33:34 +0900 > Subject: Re: redefining existing levels? > From: remko.popma@gmail.com > To: log4j-user@logging.apache.org >=20 > Is redefining levels a way to work around the issue you had with the rang= e > check? > I've replied to your range check question with a link to an example confi= g. >=20 > On Wed=2C Aug 26=2C 2015 at 8:02 AM=2C Gary Gregory > wrote: >=20 > > Well=2C let's all work together to get you up and running. Hopefully we= 'll > > get other devs to keep chiming in. > > > > > > Gary > > > > On Tue=2C Aug 25=2C 2015 at 3:58 PM=2C Nicholas Duane = wrote: > > > > > I will get to that. However=2C I assume that works as that's documen= ted > > > pretty well. So I'm looking at the other things which may or may not > > work > > > as I have to find out what blocking issues we're going to run into. > > > Redefining existing levels is one. I sent the other email regarding > > range > > > level filter as we also need that to work. It works in .NET. So far > > it's > > > looking like I'll need to write my own filter for log4j2 in order to = get > > > range level filtering working. > > > > > > Thanks=2C > > > Nick > > > > > > > Date: Tue=2C 25 Aug 2015 15:54:08 -0700 > > > > Subject: Re: redefining existing levels? > > > > From: garydgregory@gmail.com > > > > To: log4j-user@logging.apache.org > > > > > > > > Ah=2C well=2C let's start with the documented stuff we know should = work =3B-) > > > > > > > > Gary > > > > > > > > On Tue=2C Aug 25=2C 2015 at 3:19 PM=2C Nicholas Duane > > wrote: > > > > > > > > > Thanks. I assumed my 'BUSINESS' level is working using the > > > =2C > > > > > though I haven't tried it yet as I was trying to validate redefin= ing > > > > > existing level. > > > > > > > > > > Thanks=2C > > > > > Nick > > > > > > > > > > > Date: Tue=2C 25 Aug 2015 14:32:01 -0700 > > > > > > Subject: Re: redefining existing levels? > > > > > > From: garydgregory@gmail.com > > > > > > To: log4j-user@logging.apache.org > > > > > > > > > > > > Nick=2C > > > > > > > > > > > > Your BUSINESS level should be configurable per > > > > > > > > > > > > > > > > https://logging.apache.org/log4j/2.x/manual/customloglevels.html#Defini= ngLevelsInConfiguration > > > > > > > > > > > > I can't look into the rest ATM. > > > > > > > > > > > > Gary > > > > > > > > > > > > On Tue=2C Aug 25=2C 2015 at 2:16 PM=2C Nicholas Duane > > > wrote: > > > > > > > > > > > > > I guess I should have mentioned=2C though it's probably obvio= us=2C > > > that I'm > > > > > > > only interested in a configuration based solution. I'm not > > looking > > > > > for a > > > > > > > code solution. > > > > > > > > > > > > > > Thanks=2C > > > > > > > Nick > > > > > > > > > > > > > > From: nickdu@msn.com > > > > > > > To: log4j-user@logging.apache.org > > > > > > > Subject: RE: redefining existing levels? > > > > > > > Date: Tue=2C 25 Aug 2015 16:05:47 -0400 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the reply. I've seen that documentation and it > > appears > > > to > > > > > be > > > > > > > geared toward defining (NEW) custom levels. It doesn't menti= on > > > > > anything > > > > > > > about redefining existing log4j2 levels. I also tried it and= so > > > far > > > > > in my > > > > > > > testing it doesn't seem to work. Below is a snippet of my > > > config. By > > > > > the > > > > > > > way=2C you'll see that I am currently trying the and > > > > > . > > > > > > > At first I had just tried but it didn't appear = to > > > work > > > > > so I > > > > > > > thought I would put the same elements I have in my .NET confi= g > > > which > > > > > work. > > > > > > > Unfortunately it still doesn't work. > > > > > > > > > > > > > > . > > > > > > > . > > > > > > > . > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > . > > > > > > > . > > > > > > > . > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I then set my logger level to "OFF" and didn't see any debug > > events > > > > > show > > > > > > > up. If I set the level to "DEBUG" they show up in the log. = The > > > docs > > > > > say > > > > > > > that DEBUG is set to 500=2C so me setting OFF to 500 and then > > > setting the > > > > > > > level on my logger to OFF should have allowed the debug event= s to > > > flow > > > > > to > > > > > > > the log file=2C correct? > > > > > > > > > > > > > > Thanks=2C > > > > > > > Nick > > > > > > > > > > > > > > > Date: Tue=2C 25 Aug 2015 12:50:32 -0700 > > > > > > > > Subject: Re: redefining existing levels? > > > > > > > > From: garydgregory@gmail.com > > > > > > > > To: log4j-user@logging.apache.org > > > > > > > > > > > > > > > > Nicholas=2C > > > > > > > > > > > > > > > > Yes=2C please see > > > > > > > > > > https://logging.apache.org/log4j/2.x/manual/customloglevels.html > > > > > > > > > > > > > > > > If the documentation can be improved=2C please let us know = how. > > > > > > > > > > > > > > > > Gary > > > > > > > > > > > > > > > > On Tue=2C Aug 25=2C 2015 at 12:42 PM=2C Nicholas Duane < > > nickdu@msn.com > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > Can existing log4j2 levels be redefined? I'm able to do = this > > > in > > > > > > > log4net. > > > > > > > > > I have yet to see any documentation telling me that I can= do > > > it=2C > > > > > > > however=2C > > > > > > > > > there was none telling me I could do it for .NET either. = I > > > just > > > > > > > happen to > > > > > > > > > stumble upon a post which eluded to it. Here is what I'v= e > > > done in > > > > > a > > > > > > > > > log4net config file: > > > > > > > > > > > > > > > > > > > > > > > > > > > . > > > > > > > > > . > > > > > > > > > . > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > . > > > > > > > > > . > > > > > > > > > . > > > > > > > > > > > > > > > > > > . > > > > > > > > > . > > > > > > > > > . > > > > > > > > > > > > > > > > > > > > > > > > > > > As you can see I created my own 'Business' level. I also > > > redefined > > > > > > > Off to > > > > > > > > > 40000 which happens to be the INFO level. This makes it = such > > > that > > > > > if > > > > > > > they > > > > > > > > > set the level to Off they will still receive INFO and hig= her > > > level > > > > > > > events. > > > > > > > > > > > > > > > > > > Can the same thing be done in log4j2? > > > > > > > > > > > > > > > > > > Thanks=2C > > > > > > > > > Nick > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org > > > > > > > > Java Persistence with Hibernate=2C Second Edition > > > > > > > > > > > > > > > > JUnit in Action=2C Second Edition < > > > http://www.manning.com/tahchiev/> > > > > > > > > Spring Batch in Action > > > > > > > > Blog: http://garygregory.wordpress.com > > > > > > > > Home: http://garygregory.com/ > > > > > > > > Tweet! http://twitter.com/GaryGregory > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org > > > > > > Java Persistence with Hibernate=2C Second Edition > > > > > > > > > > > > JUnit in Action=2C Second Edition > > > > > > Spring Batch in Action > > > > > > Blog: http://garygregory.wordpress.com > > > > > > Home: http://garygregory.com/ > > > > > > Tweet! http://twitter.com/GaryGregory > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org > > > > Java Persistence with Hibernate=2C Second Edition > > > > > > > > JUnit in Action=2C Second Edition > > > > Spring Batch in Action > > > > Blog: http://garygregory.wordpress.com > > > > Home: http://garygregory.com/ > > > > Tweet! http://twitter.com/GaryGregory > > > > > > > > > > > > > > -- > > E-Mail: garydgregory@gmail.com | ggregory@apache.org > > Java Persistence with Hibernate=2C Second Edition > > > > JUnit in Action=2C Second Edition > > Spring Batch in Action > > Blog: http://garygregory.wordpress.com > > Home: http://garygregory.com/ > > Tweet! http://twitter.com/GaryGregory > > = --_a1a0f667-d8b9-484f-b75a-55521637d2a4_--