1Log::Dispatch::Array(3)User Contributed Perl DocumentatioLnog::Dispatch::Array(3)
2
3
4

NAME

6       Log::Dispatch::Array - log events to an array (reference)
7

VERSION

9       version 1.001
10

SYNOPSIS

12         use Log::Dispatch;
13         use Log::Dispatch::Array;
14
15         my $log = Log::Dispatch->new;
16
17         my $target = [];
18
19         $log->add(Log::Dispatch::Array->new(
20           name      => 'text_table',
21           min_level => 'debug',
22           array     => $target,
23         ));
24
25         $log->warn($_) for @events;
26
27         # now $target refers to an array of events
28

DESCRIPTION

30       This provides a Log::Dispatch log output system that appends logged
31       events to an array reference.  This is probably only useful for testing
32       the logging of your code.
33

METHODS

35   "new"
36        my $table_log = Log::Dispatch::Array->new(\%arg);
37
38       This method constructs a new Log::Dispatch::Array output object.  Valid
39       arguments are:
40
41         array - a reference to an array to append to; defaults to an attr on
42                 $table_log
43
44   array
45       This method returns a reference to the array to which logging is being
46       performed.
47
48   log_message
49       This is the method which performs the actual logging, as detailed by
50       Log::Dispatch::Output.
51

AUTHOR

53       Ricardo Signes, "<rjbs@cpan.org>"
54

BUGS

56       Please report any bugs or feature requests through the web interface at
57       <http://rt.cpan.org>.  I will be notified, and then you'll
58       automatically be notified of progress on your bug as I make changes.
59
61       Copyright 2008 Ricardo SIGNES, all rights reserved.
62
63       This program is free software; you can redistribute it and/or modify it
64       under the same terms as Perl itself.
65
66
67
68perl v5.12.0                      2008-04-29           Log::Dispatch::Array(3)
Impressum