tweak _get_loggers so it can tolerate a logger that is not aware of the log level
Tyler Riddle [Mon, 5 Nov 2012 04:33:02 +0000 (20:33 -0800)]
lib/Object/Remote/Logging/Router.pm

index d8579e3..e73f002 100644 (file)
@@ -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);
         }
     }