Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 83956 invoked from network); 11 Sep 2008 16:12:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2008 16:12:33 -0000 Received: (qmail 45391 invoked by uid 500); 11 Sep 2008 16:12:27 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 45371 invoked by uid 500); 11 Sep 2008 16:12:27 -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 45360 invoked by uid 99); 11 Sep 2008 16:12:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 09:12:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [64.143.215.202] (HELO mail03.wnco.com) (64.143.215.202) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 16:11:29 +0000 Received: from ([172.19.242.173]) by mail03.wnco.com with ESMTP id 5503182.14444808; Thu, 11 Sep 2008 11:10:31 -0500 Received: from SWAMAIL07.LUV.AD.SWACORP.COM ([172.19.242.227]) by MSSMTP02.LUV.AD.SWACORP.COM with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Sep 2008 11:10:31 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Logging from appender Date: Thu, 11 Sep 2008 11:10:30 -0500 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Logging from appender Thread-Index: AckUJ259G46C3RqHRx2JJlkMtAqzHwAATo7g References: From: "Bruno Melloni" To: "Log4J Users List" X-OriginalArrivalTime: 11 Sep 2008 16:10:31.0226 (UTC) FILETIME=[E9E731A0:01C91428] X-Virus-Checked: Checked by ClamAV on apache.org Sorry, I think I got misunderstood. I have no problem with levels/thresholds when logging from the app. What I want to do is generate an additional log message from INSIDE the appender code, WHILE it is about to process an application message.=20 bruno -----Original Message----- From: Patrick.Grimard@xtl.com [mailto:Patrick.Grimard@xtl.com]=20 Sent: Thursday, September 11, 2008 10:59 AM To: Log4J Users List Subject: Re: Logging from appender I'm not an expert on Log4j, but recently had a similar requirement. I didn't want debug messages appearing on the console. So on my console appender, I set a threshold like this: log4j.appender.CA.Threshold=3DINFO I got that from somebody else on this list. This way I only see INFO messages and above on the console and I see everything in my log file from debug up. If you did the same but set the threshold above WARN, the console will only show messages above WARN, however you won't see anything less than or equal to WARN on the console. Don't know if that helps. I think the log4j configuration in XML allows for a min and max threshold. (Embedded image moved to file: pic17673.jpg) =20 "Bruno Melloni" To=20 "Log4J Users List" 09/11/2008 11:53 AM =20 cc=20 =20 Please respond to Subject=20 "Log4J Users List" Logging from appender =20 =20 =20 =20 What is the best way to send a message to the log from inside the Appender itself? (separate from the message that the appender is currently processing) Why do I even ask this? My appender checks disk utilization every hour. I'd like to record the % of disk utilized in the log. I tried using LogLog.warn(), but it puts the message on the console, not in the log file generated by the appender. I could probably add it manually to the code that writes to the file, but that feels messy... and I suspect that there's built-in log4j functionality for what I want to do. bruno --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org