[Catalyst] Debug Output
Duncan.Garland at motortrak.com
Fri Oct 22 09:33:54 GMT 2010
I'm trying to get different logging levels in the development and testing environments. It looks like it should be quite simple, but I think I've missed something somewhere.
The default configuration of the development server (script/app_server.pl) sends messages about the actions which have executed and all levels of log messages to the standard error. That's great.
When I deploy it to the test server (Zeus) under fastcgi (script/app_fastcgi.pl) it sends all this information to the Zeus logs. That's not so good, there's a lot of it.
The base module (lib/app.pm) contains "use Catalyst qw ~-Debug~". Get rid of the -Debug. Now it doesn't send the list of actions executed to the logs. Good. However it still logs all levels of messages.
Add __PACKAGE__->log( Catalyst::Log->new( 'warn', 'error' ) ); to app.pm. That sorts out the message levels. Good.
Unfortunately I haven't got enough information in the development environment any more.
>From the documentation, I just need to set CATALYST_DEBUG=1 or APP_DEBUG=1 (and export them) and the output on the development environment should return to how it was at the beginning. Ie All levels of logging plus lots of extra stuff about actions executed.
Setting the environment variables doesn't work. I've missed something simple.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst