[Catalyst] Newbie question on debugging inside a schema

J. Shirley jshirley at gmail.com
Sat Jan 16 13:00:44 GMT 2010


On Sat, Jan 16, 2010 at 4:14 AM, Steve Kleiman <steve at prodhub.com> wrote:
> Thanks in advance for any insight provided.
>
> I'm trying to figure out how to log errors from INSIDE a schema. I gather
> it's Bad to pass in $c so that within a schema I can't do what I'd really
> like which is:
>        $c->log->warn('some useful debug info');
>
> What is the recommended procedure for debugging code inside a schema?
>

I would recommend switching your logging over to Log4perl which lets
you fetch the logging instance at several points in your code.  It
works very well, isn't hard to setup and there is
Catalyst::Log::Log4perl which you can just drop in.

-J



More information about the Catalyst mailing list