my $log_destination;
if (defined($log_level)) {
-warn "$log_level";
$log_destination = Log::Contextual::Destination->new(
logger => Log::Contextual::SimpleLogger->new({ levels_upto => $log_level }),
);
- $log_destination->connect(System::Introspector::Logger->get_router);
- #$log_destination->connect(Log::Contextual->get_root_router);
+ $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);
-use strictures 1;
-
package System::Introspector::Logger;
-use base qw(Log::Contextual);
+use strictures 1;
+
use System::Introspector::Logger::Output;
-use Log::Contextual qw( :log );
-use Log::Contextual::Destination;
+use Object::Remote::Logging qw( :log );
+use Object::Remote::LogDestination;
-sub arg_router { $_[1] || Log::Contextual::Router::Dynamic->new }
+use base qw(Object::Remote::Logging);
#should always pass in log level and execution context;
#specifying a logger is used when logging during
use System::Introspector::Logger qw ( :log );
-ok (System::Introspector::Logger->get_router->does('Log::Contextual::Role::Router'), 'router exists');
+ok (System::Introspector::Logger->arg_router->does('Log::Contextual::Role::Router'), 'router exists');
done_testing;
\ No newline at end of file
package main;
-use System::Introspector::Logger qw( :log );
+use Object::Remote::Logging qw( :log );
+use Object::Remote::LogDestination;
#make sure to enable execution of every logging code block
#by setting the log level as high as it can go
- my $____LOG_DESTINATION = Log::Contextual::Destination->new(
+ my $____LOG_DESTINATION = Object::Remote::LogDestination->new(
logger => System::Introspector::Logger::TestOutput->new({ levels_upto => 'trace' }),
);
- $____LOG_DESTINATION->connect(System::Introspector::Logger->get_root_router);
-
+ $____LOG_DESTINATION->connect(Object::Remote::Logging->arg_router);
1;