From: Mike S. <m...@pe...> - 2014-03-17 05:51:38
|
On Fri, 14 Mar 2014, Claudio Steel wrote: > I have a new catalyst app and i think your module is exactly what I need. However, I'm not > able to find where I can set the file path that I want the log to be written to. Any advice > you have is appreciated. Check out http://search.cpan.org/~mschilli/Log-Log4perl-1.42/lib/Log/Log4perl/Catalyst.pm which says that you can provide a configuration file like __PACKAGE__->log(Log::Log4perl::Catalyst->new('l4p.conf')); and in your configuration file you can specify a file appender with a user-defined path: # l4p.conf log4perl.category = WARN, Logfile log4perl.appender.Logfile = Log::Log4perl::Appender::File log4perl.appender.Logfile.filename = /foo/bar/test.log log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Logfile.layout.ConversionPattern = %d %F{1} %L> %m %n Hope this helps! -- -- Mike Mike Schilli m...@pe... |