Commit | Line | Data |
e5b3f03f |
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 |
c023aad2 |
18 | my $____LOG_DESTINATION = Object::Remote::LogDestination->new( |
19 | logger => Object::Remote::Logger::TestOutput->new({ levels_upto => 'trace' }), |
20 | ); |
e5b3f03f |
21 | |
c023aad2 |
22 | $____LOG_DESTINATION->connect(Object::Remote::Logging->arg_router); |
e5b3f03f |
23 | 1; |
24 | |