Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:

I'm looking at a site someone else created, it's Catalyst running via mod_perl on Apache 2.

Would you expect there to be separate Catalyst logs, and if so, where?


Update solved my own problem. Log calls don't seem to do anything unless the Debug flag is on.

As soon as I added it here in the top level module:

use Catalyst qw/ -Debug Other::Useful::Things /;
lots of detailed messages began to appear in /var/log/httpd/error.log. That may not be exactly where you'd find it on your system but as it's running as part of Apache, I guess it makes sense.

Replies are listed 'Best First'.
Re: Does Catalyst by default have its own logging, and if so, where?
by Anonymous Monk on Nov 04, 2020 at 14:21 UTC
    Catalyst logging is customarily (but, not necessarily) based on the Catalyst::Log facility, which usually then uses Log::Log4Perl or Log::Dispatch. See the "debugging" section of the Catalyst::Manual. You should surf the source-code and configuration files of this application to see exactly how they did it this time. Also check for configuration switches particular to "production" which might be different for "development."

      I have checked the config, and I've grepped through the source code. There are calls in the source code to $c->log->error->('foo') and I've added my own and there's nothing obvious going on.

      I've looked through /var/log and can't see anything with Catalyst, or the names of the apps in question, or anything changes when I run catalyst code to which I've added an error call.

      I would have thought if Catalyst did not have a logging system enabled, then trying to log an error would have itself thrown an error. It's a mystery.

        You didn't actually expect his "help" to be worth more than the space of the electrons they're taking up, did you?