Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 3051 invoked from network); 25 Jun 2009 17:10:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jun 2009 17:10:44 -0000 Received: (qmail 96062 invoked by uid 500); 25 Jun 2009 17:10:54 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 96031 invoked by uid 500); 25 Jun 2009 17:10:54 -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 96020 invoked by uid 99); 25 Jun 2009 17:10:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 17:10:54 +0000 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 [195.112.81.7] (HELO mail.ergonomics.ch) (195.112.81.7) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 17:10:46 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: turn off log messages in rootLogger which are supposed to end up in a named logger Date: Thu, 25 Jun 2009 19:10:10 +0200 Message-ID: <3FE38194C8A3334A959B64B7D9A1E27B83946D@plejaden.seychelles.ergo> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: turn off log messages in rootLogger which are supposed to end up in a named logger thread-index: Acn1tKmcf2YO0vzWQ1+1FXxvfmV5qQAAsEcg From: "Bender Heri" To: "Log4J Users List" X-Virus-Checked: Checked by ClamAV on apache.org Something like=20 log4j.logger.PhasesLogger.additivity=3Dfalse I am not quite sure about the correct syntax in properties file (I work = always with xml files). The additivity flag of a logger prevents the loggin event to climb up = further the logger hierarchy. Heri -----Urspr=FCngliche Nachricht----- Von: news [mailto:news@ger.gmane.org] Im Auftrag von ossi petz Gesendet: Donnerstag, 25. Juni 2009 18:32 An: log4j-user@logging.apache.org Betreff: turn off log messages in rootLogger which are supposed to end = up in a named logger hello I'm sorry for asking this boring question but after hours of experiments = and even reading a (quite old) book I cant find a solution. So maybe = someone can give me a hint what i am doing wrong. The plan is to have an application log file and a performanceLog file = which contains only certain messages ("PhasesLogger"). At the moment the messages for the performanceLog end up in the root = logger too. This is my log config: log4j.rootLogger=3DDEBUG,R log4j.logger.PhasesLogger=3DDEBUG,performanceLogger log4j.appender.R=3Dorg.apache.log4j.RollingFileAppender log4j.appender.R.File=3D/home/tomcat/tomcat/logs/log.log log4j.appender.R.MaxFileSize=3D10000KB log4j.appender.R.MaxBackupIndex=3D10 log4j.appender.R.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=3D%d{ISO8601} [%-6p] %30c - = %m%n # log4j.appender.R.threshold=3DERROR # Performance Appender: log4j.appender.performanceLogger=3Dorg.apache.log4j.RollingFileAppender log4j.appender.performanceLogger.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.performanceLogger.layout.ConversionPattern=3D%d{ISO8601} [%-6p] %14c - %m%n log4j.appender.performanceLogger.File=3D/home/tomcat/tomcat/logs/performa= nceLogger.log log4j.appender.performanceLogger.MaxFileSize=3D10000KB log4j.appender.performanceLogger.MaxBackupIndex=3D10 # log4j.appender.performanceLogger.threshold=3DDEBUG The performanceLogger is retrieved like this: private static final Logger PLOG =3D Logger.getLogger("PhasesLogger"); = PLOG.debug("things..."); how can i turn off to have the log messages for the = phases/performanceLogger end up in the rootLogger file too? any hints are welcome! regards ossi --------------------------------------------------------------------- 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