|
From: Mike S. <m...@pe...> - 2013-01-12 01:58:30
|
On Wed, 9 Jan 2013, Lee Goddard wrote:
> Is there a way to change the PatternLayout that the default Catalyst uses?
According to the Catalyst::Log::Log4perl code you can pass in your own
configuration file to specify a different layout and appender:
unless ( Log::Log4perl->initialized ) {
if ( defined($config) ) {
if ($watch_delay) {
Log::Log4perl::init_and_watch( $config, $watch_delay );
} else {
Log::Log4perl::init($config);
}
} else {
my $log = Log::Log4perl->get_logger("");
my $layout =
Log::Log4perl::Layout::PatternLayout->new(
"[%d] [catalyst] [%p] %m%n");
my $appender = Log::Log4perl::Appender->new(
"Log::Log4perl::Appender::Screen",
'name' => 'screenlog',
'stderr' => 1,
);
--
-- Mike
Mike Schilli
m...@pe...
|