[Catalyst] Simplest way to insert debug messages for Apache2 + Catalyst?

Edric ehankamo at yahoo.com
Thu Mar 9 00:33:16 CET 2006


thanks for the quick response. 
 
 Yeah I had that already in my main app class:
 
 use Catalyst qw/-Debug FormValidator/;

 Also in my apache conf file, i have the following line:
 
 ErrorLog /usr/local/test/logs/apache_error_log
 
 only error messages get outputted and not debug messages.
 
 Still no go...
 
 
 
 Brandon Black <blblack at gmail.com> wrote: On 3/8/06, Edric H  wrote:
> Hello, I've recently started using Catalyst + Apache2 as the server and have
> had a big pain in debugging my code and checking if certain statements are
> reached. I've tried googling with little luck... so far what I've tried was:
>
>  sub end : Private {
>      my ( $self, $c ) = @_;
>
>  A:
>      $c->log->debug("SWORDFISH");
>  B:
>       $c->log->info("SWORDFISH2");
>  C:
>     open(foo,'>>mydirectory/file')
>     print foo 'SWORDFISH3';
>     close(foo);
>
>     if (!$c->res->redirect || !$c->res->output) {
>          $c->forward('WWW::Admon::V::TT');
>      }
>  }
>
>  A and B don't seem to output anything anywhere. Ideally i'd like the
> messages to print to my apache error log.
>
>  Method C has been my best bet and my counterparts who worked with Catalyst
> before me suggested this method to me... now i know there has to be a more
> elegant way of making debug messages...
>
>  Can anyone please tell me or point me in the right direction? I've googled
> for a long time... I've mainly found answers for when Catalyst is standalone
> without Apache. Hopefully this is not a stupid question. Thanks.
>

If Debug is turned on (use Catalyst qw/-Debug/ in your main app
class), $c->log->debug("xxx") should show up in your apache error log
(like /var/log/apache2/error_log, or wherever you have it configured
to be at), along with all the usual Catalyst startup and per-request
debugging info.

-- Brandon

_______________________________________________
Catalyst mailing list
Catalyst at lists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst


		
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060308/7f1af2c7/attachment.htm 


More information about the Catalyst mailing list