From: Tyler Riddle Date: Mon, 5 Nov 2012 04:33:02 +0000 (-0800) Subject: tweak _get_loggers so it can tolerate a logger that is not aware of the log level X-Git-Tag: v0.003001_01~93 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b49a063d7885c23278585e52c3066c791f8934f2;p=scpubgit%2FObject-Remote.git tweak _get_loggers so it can tolerate a logger that is not aware of the log level --- diff --git a/lib/Object/Remote/Logging/Router.pm b/lib/Object/Remote/Logging/Router.pm index d8579e3..e73f002 100644 --- a/lib/Object/Remote/Logging/Router.pm +++ b/lib/Object/Remote/Logging/Router.pm @@ -33,7 +33,9 @@ sub _get_loggers { foreach my $logger ($selector->($package, { %metadata })) { next unless defined $logger; - next unless $logger->$is_level; + my $method = $logger->can($is_level); + next unless defined $method; + next unless $logger->$method; push(@loggers, $logger); } }