[Catalyst] -Debug output controlled with PerlLogHandler?

Gavin Henry ghenry at perl.me.uk
Thu Jun 8 20:00:58 CEST 2006


<quote who="Matt S Trout">
> Gavin Henry wrote:
>> <quote who="Marcello Romani">
>>> Gavin Henry ha scritto:
>>>> <quote who="Adam Jacob">
>>>>> On Jun 7, 2006, at 3:02 PM, Gavin Henry wrote:
>>>>>
>>>>>> Dear All,
>>>>>>
>>>>>> Is there anything in core that we can use to redirect -Debug output
>>>>>> to a
>>>>>> file/DB/etc, rather than normal Apache logs, using PerlLogHandler?
>>>>>>
>>>>>> Like:
>>>>>>
>>>>>> http://search.cpan.org/~stas/DocSet-0.19/examples/site/src/start/
>>>>>> tips/logging.pod
>>>>>>
>>>>>> Or should I just knock one up for my own use?
>>>>>>
>>>>>> Would be a nice thing to have, e.g just having "PerlLogHandler
>>>>>> MyApp", and
>>>>>> then something in your config/Config.yml.
>>>>>>
>>>>>> Thanks.
>>>>> You can use Catalyst::Log::Log4perl to do that.
>>>>>
>>>>> http://search.cpan.org/~holoway/Catalyst-Log-Log4perl-0.3/
>>>>> http://log4perl.sourceforge.net/
>>>> So I can put all Catalyst logging anywhere I want, and not have them
>>>> go
>>>> in
>>>> the Apache log files?
>>>>
>>> http://search.cpan.org/~mschilli/Log-Log4perl-1.04/lib/Log/Log4perl.pm#Appenders
>>>
>>> Log::Log4perl uses appenders to send log entries "to the screen, to
>>> files and to databases."
>>
>> Nice. But will this stop them going to Apache logs? Sorry to ask this
>> again, but I am either completely missing the answer or something else
>> ;-)
>
> "going to Apache logs" is what happens when you write to STDERR. So if you
> configure it not to write to STDERR (per the fine documentation), then it
> won't go to the apache logs.

Doh. Thanks for the clarification Matt.

>
> --
>       Matt S Trout       Offering custom development, consultancy and
> support
>    Technical Director    contracts for Catalyst, DBIx::Class and BAST.
> Contact
> Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more
> information
>
> + Help us build a better perl ORM:
> http://dbix-class.shadowcatsystems.co.uk/ +
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>




More information about the Catalyst mailing list