You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by "Jacob L. Anawalt" <ja...@geckosoftware.com> on 2008/03/01 00:10:40 UTC
Re: Appender filtering
Jacob L. Anawalt wrote:
> I am getting info and debug messages in my system logs.
I have purchased the log4j manual and it looks like I have the appender
threshold settings correct.
Here is the output of the attached program and configuration file.
2008-02-29 23:07:12 DEBUG root - 1
2008-02-29 23:07:12 DEBUG MyApp - 2
2008-02-29 23:07:12 WARN root - 3
2008-02-29 23:07:12 WARN MyApp - 4
--
Jacob Anawalt
Gecko Software, Inc.
janawalt@geckosoftware.com
435-752-8026
Re: Appender filtering
Posted by "Jacob L. Anawalt" <ja...@geckosoftware.com>.
Jacob L. Anawalt wrote:
> I'm going to give the LevelRangeFilter object a go via filter statements
> in an XML config.
This appears to be a very workable solution for my needs. I expect that the
Threshold option to an Appender is slightly more efficient, but I am not worried
about it.
Thank you for the your work. I look forward to 0.10 in a future release of Debian.
--
Jacob Anawalt
Gecko Software, Inc.
janawalt@geckosoftware.com
435-752-8026
Re: Appender filtering
Posted by "Jacob L. Anawalt" <ja...@geckosoftware.com>.
Curt Arnold wrote:
> I think the trailing semi-colon after WARN is messing you up.
Thank you for pointing that out. I will watch for that in the future.
Unfortunately it turned out to be more than this. The full app I am testing did
not have the semi-colon and neither did the XML config I tried.
I tracked it down to fileappender.cpp:166 in the Debian package liblog4cxx9c2a
(log4cxx version 0.9.7-6). WriteAppender::setOption was being passed the wrong
variable (name instead of option). It looks like this is already fixed in the
development version. I then found an email thread [1] mentioning a similar bug
report [2].
I'm going to give the LevelRangeFilter object a go via filter statements in an
XML config.
[1] http://marc.info/?l=log4cxx-user&m=119533748424148&w=2
[2] https://issues.apache.org/jira/browse/LOGCXX-207
--
Jacob Anawalt
Gecko Software, Inc.
janawalt@geckosoftware.com
435-752-8026
Re: Appender filtering
Posted by Curt Arnold <ca...@apache.org>.
On Feb 29, 2008, at 5:10 PM, Jacob L. Anawalt wrote:
> Jacob L. Anawalt wrote:
>> I am getting info and debug messages in my system logs.
>
> I have purchased the log4j manual and it looks like I have the
> appender threshold settings correct.
>
> Here is the output of the attached program and configuration file.
>
..
> log4j.appender.CONSOLE.Threshold=WARN;
>
> log4j.rootLogger=ALL, CONSOLE
>
I think the trailing semi-colon after WARN is messing you up. If it
can't find a level with the specified name (in this case "WARN;"), it
will default to "DEBUG".