|
From: John O. <joh...@o-...> - 2006-06-13 15:47:07
|
Hi folks,
I'm not sure how active this list is (first post) but hopefully someone
can advise! I'm seeing messages at 'debug' level getting one
PatternLayout, but all higher levels get the layout I specify.
In more detail...
(Incidentally I've patched Log::Dispatch::ApacheLog to work with
mod_perl 2 - sent patch to Dave Rolsky, awaiting response)
I'm seeing problem which looks like it's log4perl related. I'm doing this:
use Log::Log4perl qw(get_logger :levels);
my $s=Apache2::ServerUtil->server();
my $rootlog=get_logger('');
$rootlog->level($DEBUG);
my $appender=Log::Log4perl::Appender->new( "Log::Dispatch::ApacheLog",
name=>'apache log', min_level=>'debug', apache=>$s
);
$appender->layout(Log::Log4perl::Layout::PatternLayout->new('%M - %m'));
$rootlog->add_appender($appender);
The problem is, that normal lines come out like this: (note that Apache
adds the date/time and level)
"[Tue Jun 13 16:02:21 2006] [info] DataSite::Payment::new - successfully
loaded WorldPay"
(ie. that is the "%M - %m" layout I've specified)
but debug messages come out like this:
"[Tue Jun 13 16:02:21 2006] [debug] ApacheLog.pm(95):
Apache2::ScriptSite::authen - entered handler"
(looks like a PatternLayout of "%F(%L): %M - %m")
I have no idea where that layout is coming from! Apache doesn't do
anything special I believe.
any help appreciated,
John
|