give system::introspector a unique log router
Tyler Riddle [Fri, 14 Sep 2012 01:31:17 +0000 (18:31 -0700)]
bin/system-introspector
lib/System/Introspector/Logger.pm

index d3552ff..63f5c9e 100755 (executable)
@@ -43,10 +43,7 @@ if (defined($log_level)) {
        );      
        
     $log_destination->connect(System::Introspector::Logger->arg_router);
-    #$log_destination->connect(Object::Remote::Logging->arg_router);
-    #TODO attaching to this router does't work here because of
-    #timming issue
-    #$log_destination->connect(Object::Remote::Logging->get_router);
+    $log_destination->connect(Object::Remote::Logging->arg_router);
 }
 
 $config_file = "$storage_dir/main.conf" unless defined $config_file;
index fa50436..47c0833 100644 (file)
@@ -8,6 +8,8 @@ use Object::Remote::LogDestination;
 
 use base qw(Object::Remote::Logging);
 
+sub arg_router { return $_[1] if defined $_[1]; our $Router_Instance ||= Object::Remote::LogRouter->new }
+
 #should always pass in log level and execution context;
 #specifying a logger is used when logging during
 #testing so a null output logging class can be used