From: Tyler Riddle Date: Wed, 7 Nov 2012 05:35:34 +0000 (-0800) Subject: example of warn logger X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=08644bf1c1d6b2ba127ec7a059baee2694430095;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;