revise log router api to match log::contextual router api change
[scpubgit/Object-Remote.git] / t / logsetup.pl
CommitLineData
f129bfaf 1#require this file in the test to initialize the logging framework
2#so the tests can run
3
4package Object::Remote::Logger::TestOutput;
5
6use base qw ( Log::Contextual::SimpleLogger );
7
8#we want the code blocks in the log lines to execute but not
9#output anything so turn this into a null logger
10sub _log { }
11
12package main;
13
14use Object::Remote::Logging qw( :log );
15use Object::Remote::LogDestination;
16#make sure to enable execution of every logging code block
17#by setting the log level as high as it can go
09130cd0 18 my $____LOG_DESTINATION = Object::Remote::LogDestination->new(
19 logger => Object::Remote::Logger::TestOutput->new({ levels_upto => 'trace' }),
20 );
f129bfaf 21
09130cd0 22 $____LOG_DESTINATION->connect(Object::Remote::Logging->arg_router);
f129bfaf 231;
24