From: Tyler Riddle Date: Wed, 7 Nov 2012 05:35:34 +0000 (-0800) Subject: example of warn logger X-Git-Tag: v0.003001_01~83 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1b5b145b0d29afa9dda70a3de0b3546efddb00a0;p=scpubgit%2FObject-Remote.git example of warn logger --- diff --git a/lib/Object/Remote/Logging/WarnLogger.pm b/lib/Object/Remote/Logging/WarnLogger.pm new file mode 100644 index 0000000..f9ffc92 --- /dev/null +++ b/lib/Object/Remote/Logging/WarnLogger.pm @@ -0,0 +1,12 @@ +package Object::Remote::Logging::WarnLogger; + +use Moo; + +extends 'Object::Remote::Logging::Logger'; + +has format => ( is => 'ro', required => 1, default => sub { '%s at %f line %i, log level: %l' } ); +has min_level => ( is => 'ro', required => 1, default => sub { 'warn' } ); + +sub output { warn $_[1] }; + +1;