[Catalyst] Catalyst::Log patch (with tests)
Ovid
publiustemp-catalyst at yahoo.com
Fri Jan 13 22:04:43 CET 2006
Hi all,
The attached patch modifies Catalyst::Log to make it a bit easier to
control logging output. Tests are included, but these are only the
minimum necessary to test the desired behavior. I've updated the docs
(and fixed a small POD error, too).
This patch also adds a dependency on Test::NoWarnings.
Basically, you do this:
package Catalyst::Log::Subclass;
our @ISA = 'Catalyst::Log';
sub _send_to_log {
my $self = shift;
# @_ contains the log messages. Do with them
# what you will
}
In your app, you should then be able to do this to get your new
behavior:
$c->log( Catalyst::Log::Subclass->new );
Cheers,
Ovid
--
If this message is a response to a question on a mailing list, please send follow up questions to the list.
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.patch
Type: application/octet-stream
Size: 3867 bytes
Desc: 320870010-log.patch
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060113/1eafcd0c/log.obj
More information about the Catalyst
mailing list