Return-Path: Delivered-To: apmail-jakarta-log4j-user-archive@jakarta.apache.org Received: (qmail 38834 invoked by uid 500); 3 Sep 2001 16:48:28 -0000 Mailing-List: contact log4j-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: "LOG4J Users Mailing List" Delivered-To: mailing list log4j-user@jakarta.apache.org Received: (qmail 38801 invoked from network); 3 Sep 2001 16:48:27 -0000 Message-ID: <3B93B4BA.E5C579ED@abnamro.nl> Date: Mon, 03 Sep 2001 18:50:02 +0200 From: "Ton van Bart" Organization: ABN AMRO Bank N.V. X-Mailer: Mozilla 4.72 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: log4j-user@jakarta.apache.org Subject: Unable to set treshold on appender? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, For an app that we're building, I'm trying to set up log4j in such a way that all messages of priority info or above are logged to a file, and messages of prioriry fatal also go to syslog (where they can be picked up by a management station). In order to do this, I tried to setup one Category with two appenders. The root Category has it's priority set to INFO, and I want the syslogappender to have priority FATAL. Config file (for test) is as follows: log4j.rootCategory=INFO, console, logfile log4j.appender.logfile=org.apache.log4j.ConsoleAppender log4j.appender.logfile.treshold=error log4j.appender.logfile.layout=org.apache.log4j.PatternLayout log4j.appender.logfile.layout.ConversionPattern=logfile: %d %t [%p] %m%n log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.console.layout.ConversionPattern=console: %d %t [%p] %m%n But when I run my test app, I get an error message: log4j:WARN No such property [treshold] in org.apache.log4j.ConsoleAppender. However when I read the Javadoc, I see that ConsoleAppender inherits a method setTreshold(priority) from org.apache.log4j.AppenderSkeleton, leading me to believe that I should be able to set the treshold for an appender in the manner specified above. I also tried to do a setTreshold in the code, with similar results. What am I doing wrong? Is there any other way to accomplish what I want ? TIA for any info, Ton van Bart --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: log4j-user-help@jakarta.apache.org