a55a28bce7aec7ce492adf405d154a191a31d06f
[scpubgit/Object-Remote.git] / t / logsetup.pl
1 #require this file in the test to initialize the logging framework
2 #so the tests can run
3
4 package Object::Remote::Logger::TestOutput; 
5
6 use 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
10 sub _log { }
11
12 package main; 
13
14 use Object::Remote::Logging qw( :log ); 
15 use 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
18   my $____LOG_DESTINATION = Object::Remote::LogDestination->new(
19     logger => Object::Remote::Logger::TestOutput->new({ levels_upto => 'trace' }),
20   );  
21     
22   $____LOG_DESTINATION->connect(Object::Remote::Logging->arg_router);
23 1;
24