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-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=79cffebe11746024fc562ff019e0f2173b9163de;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); } }