X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flogsetup.pl;h=c119940ad4a93820c0ffaa5e20e1681a7817a9a2;hb=515662654de237f5d17c6d3c7169b6a3b08c18d9;hp=3eff7e1a4252d19203e7214bea63e2ef6de056d4;hpb=f129bfaf05b1ae0e2e2992cad47a70482dec9885;p=scpubgit%2FObject-Remote.git diff --git a/t/logsetup.pl b/t/logsetup.pl index 3eff7e1..c119940 100644 --- a/t/logsetup.pl +++ b/t/logsetup.pl @@ -1,24 +1,22 @@ #require this file in the test to initialize the logging framework -#so the tests can run +#so the tests can run and all log items can be executed during testing -package Object::Remote::Logger::TestOutput; +package Object::Remote::Logging::TestOutput; -use base qw ( Log::Contextual::SimpleLogger ); +use base qw ( Object::Remote::Logging::Logger ); -#we want the code blocks in the log lines to execute but not -#output anything so turn this into a null logger -sub _log { } +#don't need to output anything +sub _output { } package main; -use Object::Remote::Logging qw( :log ); -use Object::Remote::LogDestination; +use Object::Remote::Logging qw( router ); #make sure to enable execution of every logging code block #by setting the log level as high as it can go - my $____LOG_DESTINATION = Object::Remote::LogDestination->new( - logger => Object::Remote::Logger::TestOutput->new({ levels_upto => 'trace' }), - ); - - $____LOG_DESTINATION->connect(Object::Remote::Logging->arg_router); +router->connect(Object::Remote::Logging::TestOutput->new( + min_level => 'trace', max_level => 'error', + level_names => Object::Remote::Logging->arg_levels(), +)); + 1;