Situation: All my classes do logging to certain categories within a clear hierarchy (for example: category <a.b.c.Class1.Method1>)
I've configured an logger like this:
<log4perl.logger.a.b.c=DEBUG, FileAppender>
What I now want to achieve is (via configuration), is that category <a.b.c.Class1.Method1> is logged only at WARN-Level to the same appender ...
Something like this:
<log4perl.logger.a.b.c.Class1.Method1=WARN, FileAppender>
What happens is, that DEBUG-msg of category <a.b.c.Class1.Method1> are also logged in Fileappender (due to configuration <log4perl.logger.a.b.c=DEBUG, FileAppender>) ...
Is this possible? Any other way to do this?
Any help welcome....
Johannes
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I need some help configuring log4perl.
Situation: All my classes do logging to certain categories within a clear hierarchy (for example: category <a.b.c.Class1.Method1>)
I've configured an logger like this:
<log4perl.logger.a.b.c=DEBUG, FileAppender>
What I now want to achieve is (via configuration), is that category <a.b.c.Class1.Method1> is logged only at WARN-Level to the same appender ...
Something like this:
<log4perl.logger.a.b.c.Class1.Method1=WARN, FileAppender>
What happens is, that DEBUG-msg of category <a.b.c.Class1.Method1> are also logged in Fileappender (due to configuration <log4perl.logger.a.b.c=DEBUG, FileAppender>) ...
Is this possible? Any other way to do this?
Any help welcome....
Johannes
Check out this FAQ to fix the problem:
http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#I_keep_getting_duplicate_log_messages!_What's_wrong?