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
[email protected]
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
log4perl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/log4perl-devel