Re: [Catalyst] Trapping added errors with the correct caller

2012-10-16 Thread Alexander Hartmaier
On 2012-10-16 00:04, Kieren Diment wrote: I've had a lot of luck with Log::Contextual recently. It's nice for easily getting logging into model classes. I'm going to use Log::Any for that in the future. On 16/10/2012, at 1:21 AM, Alexander Hartmaier wrote: I recommend to use a logging

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-16 Thread Alexander Hartmaier
On 2012-10-15 18:55, Robert Rothenberg wrote: On 15/10/12 17:49 Alexander Hartmaier wrote: On 2012-10-15 18:03, Robert Rothenberg wrote: On 15/10/12 15:21 Alexander Hartmaier wrote: I recommend to use a logging module like Log::Log4perl::Catalyst and do all your app logging there. I use

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-15 Thread Alexander Hartmaier
I recommend to use a logging module like Log::Log4perl::Catalyst and do all your app logging there. My log package for NAC::Web:NAC looks like this: package NAC::Web::NAC::Log; use Moose; use Catalyst::Log; use namespace::autoclean; BEGIN { extends 'Log::Log4perl::Catalyst'; } =head1 NAME

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-15 Thread Robert Rothenberg
On 15/10/12 15:21 Alexander Hartmaier wrote: I recommend to use a logging module like Log::Log4perl::Catalyst and do all your app logging there. I use Log::Dispatch. (The application is already deployed, and it's not feasible to change it to Log4perl now.) I don't see where in your code you

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-15 Thread Alexander Hartmaier
On 2012-10-15 18:03, Robert Rothenberg wrote: On 15/10/12 15:21 Alexander Hartmaier wrote: I recommend to use a logging module like Log::Log4perl::Catalyst and do all your app logging there. I use Log::Dispatch. (The application is already deployed, and it's not feasible to change it to

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-15 Thread Robert Rothenberg
On 15/10/12 17:49 Alexander Hartmaier wrote: On 2012-10-15 18:03, Robert Rothenberg wrote: On 15/10/12 15:21 Alexander Hartmaier wrote: I recommend to use a logging module like Log::Log4perl::Catalyst and do all your app logging there. I use Log::Dispatch. (The application is already

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-15 Thread Kieren Diment
I've had a lot of luck with Log::Contextual recently. It's nice for easily getting logging into model classes. On 16/10/2012, at 1:21 AM, Alexander Hartmaier wrote: I recommend to use a logging module like Log::Log4perl::Catalyst and do all your app logging there. My log package for

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-11 Thread Bill Moseley
On Thu, Oct 11, 2012 at 5:38 AM, Robert Rothenberg rob...@gmail.com wrote: I would like to trap every error added to $c-error() and log it, noting the caller (filename, line number) in the logs. I've not gotten Catalyst::Plugin::ErrorCatcher to work, so I wrote my own plugin that overrides

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-11 Thread Chisel
On Thu, Oct 11, 2012 at 1:38 PM, Robert Rothenberg rob...@gmail.com wrote: I would like to trap every error added to $c-error() and log it, noting the caller (filename, line number) in the logs. I've not gotten Catalyst::Plugin::ErrorCatcher to work, so I wrote my own plugin that overrides

Re: [Catalyst] Trapping added errors with the correct caller

2012-10-11 Thread Robert Rothenberg
On 11/10/12 14:16 Bill Moseley wrote: On Thu, Oct 11, 2012 at 5:38 AM, Robert Rothenberg rob...@gmail.com mailto:rob...@gmail.com wrote: I would like to trap every error added to $c-error() and log it, noting the caller (filename, line number) in the logs. I've not