X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FLogging.pm;h=cf85e10f6a7a71362abe80a5ebf12072063ae5ea;hp=d8bfdba721b2527c399b96c4254df2d759b140f4;hb=466ee2c442ee6958e077a02c3c250245f06ad819;hpb=eb49c7df7a88ac9114188e9eeb1480205bea97ee diff --git a/lib/Object/Remote/Logging.pm b/lib/Object/Remote/Logging.pm index d8bfdba..cf85e10 100644 --- a/lib/Object/Remote/Logging.pm +++ b/lib/Object/Remote/Logging.pm @@ -49,11 +49,9 @@ sub init_logging { level_names => Object::Remote::Logging::arg_levels(), ); - #TODO check on speed of string compare against a hash with a single key router()->connect(sub { my $controller = $_[1]->{controller}; -# warn $controller; - return unless $controller_should_log{$controller}; + return unless $controller_should_log{'*'} || $controller_should_log{$controller}; #skip things from remote hosts because they log to STDERR #when OBJECT_REMOTE_LOG_LEVEL is in effect return if $_[1]->{remote}->{connection_id}; @@ -67,7 +65,7 @@ sub init_logging_forwarding { my ($self, %controller_info) = @_; router()->_remote_metadata({ connection_id => $controller_info{connection_id} }); - router()->_forward_destination($controller_info{router}); + router()->_forward_destination($controller_info{router}) if $ENV{OBJECT_REMOTE_LOG_FORWARDING}; } 1;