[Catalyst] Redirecting Catalyst's Log to a File

Peter Karman peter at peknet.com
Mon Mar 8 14:32:46 GMT 2010


John Karr wrote on 03/08/2010 03:14 AM:
> I'm having a problem with deploying a Catalyst application (I'm learning
> Catalyst and this is the first application I've tried to put on the web, and
> it works on my test machine which has a similar configuration to my ISP, but
> just times-out at my isp returning nothing), and need to capture the logging
> output from the fastcgi script to a file instead of the apache log. I
> already tried plugging in Catalyst::Plugin::Log4perl::Simple, while it
> redirects cgi and Catalyst's internal server to a file it does not work
> under fastcgi. 

I use Catalyst::Plugin::Log4perl (no ::Simple) with fcgi and it works.
Here's my config:

############################################################
# A simple root logger with a Log::Log4perl::Appender::File
# file appender in Perl.
############################################################
log4perl.rootLogger=DEBUG, LOGFILE

log4perl.appender.LOGFILE=Log::Log4perl::Appender::File
log4perl.appender.LOGFILE.filename=/var/log/apache2/myapp.log
log4perl.appender.LOGFILE.mode=append

log4perl.appender.LOGFILE.layout=PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern=[%r] %d %c - %m%n



-- 
Peter Karman  .  http://peknet.com/  .  peter at peknet.com



More information about the Catalyst mailing list