These are your instructions to Log4perl:
log4perl.logger = DEBUG, FD, SAttach debug log level to debug.log and STDOUT.
Set log level to debug.
Attach info log level to $0-log.txt.
Set log level to info (no longer debug)
Attach error log level to fatal.log
Set log level to error (debug and info are ignored)
You can select the log level and different behaviours for different log levels. You are setting up three different behaviours and selecting the ERROR log level -- DEBUG and INFO are not being used. Try changing the order of the frist three lines and see what happens -- the last one should always apply.
Some other points:
log4perl.appender.FI.filename= log4perl.appender.File.filename = \ sub {my $p = $0; $p =~ s{(\w+)\.\w+$}{/home/perl_logs/$1.txt}; ret +urn $p;}
Should probably be:
log4perl.appender.FI.filename= \ sub {my $p = $0; $p =~ s{(\w+)\.\w+$}{/home/perl_logs/$1.txt}; ret +urn $p;}
and a typo at the line that says:
log4perl.appender.FW.layout.ConversionPattern = %d %p -- %m %nshould probably read:
log4perl.appender.FI.layout.ConversionPattern = %d %p -- %m %n ^^
Hope that helps
In reply to Re: help with Log::Log4perl config file
by holo
in thread help with Log::Log4perl config file
by water
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |