1Appender::TestBuffer(3)User Contributed Perl DocumentatioAnppender::TestBuffer(3)
2
3
4

NAME

6       Log::Log4perl::Appender::TestBuffer - Appender class for testing
7

SYNOPSIS

9         use Log::Log4perl::Appender::TestBuffer;
10
11         my $appender = Log::Log4perl::Appender::TestBuffer->new(
12             name      => 'buffer',
13             min_level => 'debug',
14             );
15
16             # Append to the buffer
17         $appender->log_message(
18             level =  > 'alert',
19             message => "I'm searching the city for sci-fi wasabi\n"
20             );
21
22             # Retrieve the result
23         my $result = $appender->buffer();
24
25             # Reset the buffer to the empty string
26         $appender->reset();
27

DESCRIPTION

29       This class is used for internal testing of "Log::Log4perl". It is a
30       "Log::Dispatch"-style appender, which writes to a buffer in memory,
31       from where actual results can be easily retrieved later to compare with
32       expeced results.
33

SEE ALSO

AUTHOR

36       Mike Schilli, <m@perlmeister.com>
37
38
39
40perl v5.8.8                       2002-07-10           Appender::TestBuffer(3)
Impressum