[Catalyst-dev] Log not being setup properly
Adam Jacob
adam at stalecoffee.org
Wed Sep 27 19:41:40 CEST 2006
On Sep 27, 2006, at 5:53 AM, Matt S Trout wrote:
> Yeah, I'm assuming that's mostly just a shortcut for default log
> levels in the
> absence of config.
>
> Actually ... shouldn't -Log determine the type of logger? i.e. -
> Log=Log4Perl
> just like -Engine= and -Dispatcher= work?
That sounds like a pretty fine idea to me. I've never been
particularly fond of
__PACKAGE__->log(Catalyst::Log::Log4perl->new);
That looks like a pretty simple patch to Catalyst.pm's setup_log.
The current behavior takes -Debug and set's what -Log would normally
have:
__PACKAGE->setup(qw/-Debug/);
So assuming nobody is actually using:
__PACKAGE__->setup(qw/-Log=Error/);
If would be easy enough to override. We could do some magic as well:
__PACKAGE__->setup(qw/-Log=Log4perl);
Basically just reserving the Catalyst::Log levels as special words,
never allowed to be Catalyst::Log descendants.
I'll be happy to work up a patch, but I've got a fairly full load of
commitments for the next couple of weeks. Want I should stick this
on the todo list?
Adam
More information about the Catalyst-dev
mailing list