Return-Path: Delivered-To: apmail-jakarta-log4j-user-archive@apache.org Received: (qmail 64736 invoked from network); 14 Feb 2002 07:44:28 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 14 Feb 2002 07:44:28 -0000 Received: (qmail 29232 invoked by uid 97); 14 Feb 2002 07:44:35 -0000 Delivered-To: qmlist-jakarta-archive-log4j-user@jakarta.apache.org Received: (qmail 29200 invoked by uid 97); 14 Feb 2002 07:44:35 -0000 Mailing-List: contact log4j-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@jakarta.apache.org Received: (qmail 29189 invoked from network); 14 Feb 2002 07:44:34 -0000 Date: 14 Feb 2002 07:32:58 -0000 Message-ID: <20020214073258.23927.qmail@sidereal.kz> From: "Dr. Evil" To: log4j-user@jakarta.apache.org, thomas.sauder@iwka.de In-reply-to: <97D358403DCBD4119B1E00D0B71DBE593736BF@issrv01.iwka.de> (thomas.sauder@iwka.de) Subject: Re: AW: Changing logging levels at runtime References: <97D358403DCBD4119B1E00D0B71DBE593736BF@issrv01.iwka.de> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > Your log4j.properties looks OK for me. > You have to reinitialize log4j to get rid of your DEBUG messages. > > There are at least to ways to do this: > 1) Restart Tomcat. ( Not good for production system). > 2) Use a init Servlet for your webapps and initialize log4j with > PropertyConfigurator.configureAndWatch or DOMConfigurator.configureAndWatch > See API docs and user manual for details. It's no problem for me to restart Tomcat. I'll power cycle the machine if it helps. I'll do anything I need to do so that I can stop getting DEBUG level messages, because the alternative is that I have to go through the code and manually remove all the logging statements. It seems that there must be a way of specifying this in the properties file, but I can't find it. I have restarted it a hundred times with this config file: # Set root category priority to DEBUG and its only appender to A1. log4j.rootCategory=INFO, A1 log4j.threshold=INFO log4j.disable=DEBUG # where to append to log4j.appender.A1=org.apache.log4j.FileAppender # set up the filename log4j.appender.A1.File=/tmp/test.log # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n and I still get logs full of DEBUG messages. I read in the FAQ: > What are Categories? > > The notion of categories lies at the heart of log4j. Categories define > a hierarchy and give the programmer run-time control on which > statements are printed or not. so it sounds like this is something which should be possible. Do I need an XML config file? Is there some patch I need to apply to log4j? Any tips would be welcome. I also read through all the mailing list archives and there were some threads on this issue, and I tried their recomendations but none of it helps. Thanks for any sugestions. -- To unsubscribe, e-mail: For additional commands, e-mail: