FAQ
I need Catalyst::Log::Log4perl to produce multiple log files. I have a
Catalyst application that runs batch scripts and needs to generate a
separate log file for each script.

Ideally, I'd like to change the log file name dynamically within a
Catalyst controller each time it's called.

Using a sub{} on filename in the config only runs the sub{} the first
time it loads up the conf -- it doesn't run it after that, so it
doesn't quite work.

log4perl.appender.Logfile = Log::Log4perl::Appender::File
log4perl.appender.Logfile.filename = sub { return get_log_file(); }

Any ideas?

Thanks!

Asim

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMar 23, '11 at 4:19p
activeMar 23, '11 at 4:19p
posts1
users1
websitecatalystframework.org
irc#catalyst

1 user in discussion

Asim Jalis: 1 post

People

Translate

site design / logo © 2022 Grokbase