logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Bosteels" <mbosteels....@gmail.com>
Subject Re: setting threshold for SyslogAppender
Date Mon, 17 Sep 2007 13:53:59 GMT
On 9/17/07, fernandezj@wclc.com <fernandezj@wclc.com> wrote:
>
>
> There is a spelling mistake. The word is "threshold". Give that a try.



Dough !
My colleague and I both made the same mistake, and we had the correct
spelling 5 lines higher on another appender.
Thanks !

Maarten

-----Original Message-----
> From: Maarten Bosteels [mailto:mbosteels.dns@gmail.com]
> Sent: Monday, September 17, 2007 3:52 AM
> To: Log4J Users List
> Subject: setting threshold for SyslogAppender
>
> Hello all,
>
> I am using log4j-1.2.15.
> And I would like to configure the SyslogAppender via a properties file.
>
> Programmatically it works:
>
>   public static void main(String[] args) {
>     Logger.getRootLogger().removeAllAppenders();
>     Logger.getRootLogger().setLevel(Level.DEBUG);
>     SyslogAppender appender = new SyslogAppender(new SimpleLayout(),
> "localhost", SyslogAppender.LOG_LOCAL6);
>     appender.setThreshold(Level.INFO);
>     Logger.getRootLogger().addAppender(appender);
>     Logger.getRootLogger().debug("some debug");
>     Logger.getRootLogger().info("some info");
>     Logger.getRootLogger().warn("some warn");
>     Logger.getRootLogger().error("some error");
>   }
>
> But when I use this config file:
>
> log4j.rootLogger=DEBUG,Syslog
> log4j.appender.Syslog=org.apache.log4j.net.SyslogAppender
> log4j.appender.Syslog.syslogHost=localhost
> log4j.appender.Syslog.facility=LOCAL6
> log4j.appender.Syslog.layout=org.apache.log4j.SimpleLayout
> log4j.appender.Syslog.treshold=INFO
>
>
> I get the following message:  log4j:WARN No such property [treshold] in
> org.apache.log4j.net.SyslogAppender.
> And of course the treshold is not working.
>
> Should I report this in bugzilla ?
>
> Maarten
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message