X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=t%2Flogsetup.pl;h=e5836630fb2bf7e895fd26258521cbc69698b6ed;hp=a55a28bce7aec7ce492adf405d154a191a31d06f;hb=4e4463355a9ec6afdc7983ee36daa9f11306d4fc;hpb=6536ccd3af048ed71845cc5ea453855f45e66971 diff --git a/t/logsetup.pl b/t/logsetup.pl index a55a28b..e583663 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( get_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); +get_router->connect(Object::Remote::Logging::TestOutput->new( + min_level => 'trace', max_level => 'error', + level_names => Object::Remote::Logging->arg_levels(), +)); + 1;