Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package Log::Minimal::Emotional;
use strict;
use warnings;
use parent qw(Log::Minimal);
our $EMOTION = {
DEBUG => '(☼ Д ☼)',
INFO => 'm9(^Д^)',
WARN => '(´・ω・`)',
CRITICAL => '(; Д ) ゜ ゜',
};
$Log::Minimal::PRINT = sub {
my ( $time, $type, $message, $trace, $raw_message) = @_;
warn "$time ", ($EMOTION->{$type}||"[$type]"), " $message at $trace\n";
};
1;
__END__
=head1 NAME
Log::Minimal::Emotional - Emotional!!! but customizable logger.
=head1 SYNOPSIS
see L<Log::Minimal>, L<http://f.hatena.ne.jp/hirose31/20130215145419>
=cut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.