From log4j-user-return-24489-apmail-logging-log4j-user-archive=logging.apache.org@logging.apache.org Fri Jun 8 15:03:21 2012 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 14CF4CF04 for ; Fri, 8 Jun 2012 15:03:21 +0000 (UTC) Received: (qmail 49958 invoked by uid 500); 8 Jun 2012 15:03:20 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 49851 invoked by uid 500); 8 Jun 2012 15:03:20 -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 49839 invoked by uid 99); 8 Jun 2012 15:03:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 15:03:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hoju@visi.com designates 208.42.184.244 as permitted sender) Received: from [208.42.184.244] (HELO g2host.com) (208.42.184.244) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 15:03:13 +0000 Received: from [162.136.192.1] (account hoju@visi.com) by mailback4.g2host.com (CommuniGate Pro WEBUSER 5.3.11) with HTTP id 7582985 for log4j-user@logging.apache.org; Fri, 08 Jun 2012 10:02:52 -0500 From: "Jacob Kjome" Subject: Re: class specific logging level To: "Log4J Users List" X-Mailer: CommuniGate Pro WebUser v5.3.11 Date: Fri, 08 Jun 2012 10:02:52 -0500 Message-ID: In-Reply-To: <33979415.post@talk.nabble.com> References: <33974515.post@talk.nabble.com> <33979415.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8; format="flowed" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org What I've provided does exactly what you are asking for.  Setting your class logging level to DEBUG overrides the inherited level from root for the specified logger name.  Why don't you just try it and see what it does rather than speculate on why you believe it wouldn't work?  You can also read try reading the docs... http://logging.apache.org/log4j/1.2/manual.html Jake On Thu, 7 Jun 2012 20:44:05 -0700 (PDT)  aggarwal wrote: > > So when root level is ERROR and i set Myclass level to DEBUG, how will the > Myclass's DEBUG logs get logged since the root level is ERROR and it will > block the DEBUG logs ? What i know is that, if I set root level to DEBUG and > some particular class (say Myclass) logger level to ERROR then, all classes' > logs of DEBUG will get logged but not of Myclass as its restricted to ERROR. > But what I want is the vice-versa. I want ERROR level of all classes and > DEBUG of only few important classes. I am new to log4j so maybe what i am > sayin is wrong. > > > > Jacob Kjome wrote: >> >> >> If you name your loggers by class name, then sure.  This is standard >> logging >> configuration, not some extra special workaround. >> >> >>     >>     >> >> >>     >>     >> >> >>     >>     >> >> >> >> Jake >> >> On Thu, 7 Jun 2012 01:51:07 -0700 (PDT) >>  aggarwal wrote: >>> >>> Hi, >>> >>> Is it possible to set logging level for few selected classes in appender >>> to >>> DEBUG and rest all ERROR ? Is there any combination of filter that can do >>> this ? >>> -- >>> View this message in context: >>>http://old.nabble.com/class-specific-logging-level-tp33974515p33974515.html >>> Sent from the Log4j - Users mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org >>>For additional commands, e-mail: log4j-user-help@logging.apache.org >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org >> For additional commands, e-mail: log4j-user-help@logging.apache.org >> >> >> > > -- > View this message in context: >http://old.nabble.com/class-specific-logging-level-tp33974515p33979415.html > Sent from the Log4j - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org >For additional commands, e-mail: log4j-user-help@logging.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org