Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 27520 invoked from network); 21 Dec 2005 05:33:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Dec 2005 05:33:53 -0000 Received: (qmail 6205 invoked by uid 500); 21 Dec 2005 05:33:49 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 6126 invoked by uid 500); 21 Dec 2005 05:33:48 -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 6115 invoked by uid 99); 21 Dec 2005 05:33:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2005 21:33:48 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [68.142.198.205] (HELO smtp106.sbc.mail.mud.yahoo.com) (68.142.198.205) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 20 Dec 2005 21:33:47 -0800 Received: (qmail 54195 invoked from network); 21 Dec 2005 05:33:26 -0000 Received: from unknown (HELO ?192.168.10.101?) (curt.arnold@sbcglobal.net@70.116.114.115 with plain) by smtp106.sbc.mail.mud.yahoo.com with SMTP; 21 Dec 2005 05:33:26 -0000 Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <4AF82B74E54BE342B85F13FCD821BB0D05435290@CHITDSEXC02.tds.corp.cendant.org> References: <4AF82B74E54BE342B85F13FCD821BB0D05435290@CHITDSEXC02.tds.corp.cendant.org> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <56A5C4B2-BA1B-474F-8017-0D9763B27219@apache.org> Content-Transfer-Encoding: 7bit From: Curt Arnold Subject: Re: How to add a new logging level that is independent of the defualt ones. Date: Tue, 20 Dec 2005 23:33:13 -0600 To: Log4J Users List X-Mailer: Apple Mail (2.746.2) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Dec 20, 2005, at 5:45 AM, Joseph, Shinoy wrote: > > Hi, > I am in need of adding a new level logging in to the log4j. > Requirement is that the new level should be independent of the > existing levels(debug,warn,info error,fatal etc). > > I have added the new level by extending Level, Logger and > LoggingFactory classes. > Is it possible to do that by customizing log4j.xml ? It will be > great if some could guide me in this regard. > > Thanks & Regards > Shinoy As you've noticed, it isn't easy to do and it makes you maintain a branched version of log4j. In many cases, people add levels for reasons that are much better addressed by using the logger hierarchy more effectively. For example, they'd like to add a level SECURITY or AUDIT when that is more a description of the intended audience instead of the significance of the message to the audience. In that case, having a branch of the logger hierarchy for security related messages ("security.myapp.foo") is better than logging a message of Level.SECURITY to "myapp.foo". If you explain your requirements, maybe we can find a decent solution that doesn't require you maintaining your own branched copy of log4j. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org