From user-return-21179-apmail-commons-user-archive=commons.apache.org@commons.apache.org Mon Jun 02 20:48:47 2008 Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 11034 invoked from network); 2 Jun 2008 20:48:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jun 2008 20:48:46 -0000 Received: (qmail 23245 invoked by uid 500); 2 Jun 2008 20:48:44 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 23172 invoked by uid 500); 2 Jun 2008 20:48:44 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 23161 invoked by uid 99); 2 Jun 2008 20:48:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 13:48:44 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [82.209.166.4] (HELO smtp.bredband2.net) (82.209.166.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 20:47:49 +0000 Received: (qmail 2171 invoked from network); 2 Jun 2008 20:56:23 -0000 Received: from me-57-111-233-83.3.cust.bredband2.com (HELO [192.168.0.3]) ([83.233.111.57]) (envelope-sender ) by smtp.bredband2.net (qmail-ldap-1.03) with SMTP for ; 2 Jun 2008 20:56:23 -0000 Message-ID: <48445C89.9020309@apache.org> Date: Mon, 02 Jun 2008 22:48:09 +0200 From: Dennis Lundberg User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Commons Users List Subject: Re: Turning off commons logging References: <48433DEB.7020706@esonicspider.com> In-Reply-To: <48433DEB.7020706@esonicspider.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org John B. Moore wrote: > I'm using a number of org.apache.commons libraries in a web project and > I need to turn off the logging that is occurring within the commons. I > must confess that, though I have used Log4j for years, I only use it at > a very basic level and still rely on a very basic property file. (shown > at the bottom of this message) > > The commons libraries are generating massive amounts of output and I > need to shut that off. > > I keep my log4j.properties file for a given webapp in: > > ../tomcat/webapps/applicationroot/conf/log4j.properties The place where we put our log4j configuration file in webapps is .../tomcat/webapps/myWebapp/WEB-INF/classes/logj4.properties That puts it on the classpath for the webapp. If you have it in the place you mentioned above, I don't think that it will be found by Log4j being called through Commons Logging. > My first guess wast that it is seeing my core instance of Log4j and > using that.. but when I add > > log4j.logger.org.apache.commons=ERROR > > ..it has no effect.. which makes me question that it is seeing my > configuration file. > > Anyone have some hints as to getting the commons logging turned off > without affecting my application logging. > > Thanks.. > > John.. > > > ================ current log4j property file contents =========== > > log4j.rootLogger=DEBUG, A1, R1 > > # A1 is a Console Appender > log4j.appender.A1=org.apache.log4j.ConsoleAppender > > # R1 is a Rolling file appender > log4j.appender.R1=org.apache.log4j.RollingFileAppender > log4j.appender.R1.File=application.log > # File Size > log4j.appender.R1.MaxFileSize=100KB > # Keep one backup file > log4j.appender.R1.MaxBackupIndex=2 > > > # Output Patterns > log4j.appender.A1.layout=org.apache.log4j.PatternLayout > log4j.appender.A1.layout.ConversionPattern=%-4r [%t](%F:%L) %-5p - %m%n > > log4j.appender.R1.layout=org.apache.log4j.PatternLayout > log4j.appender.R1.layout.ConversionPattern=%-4r [%t](%F:%L) %-5p - %m%n > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > -- Dennis Lundberg --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org