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.005
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

PERL VERSION

35       This library should run on perls released even a long time ago.  It
36       should work on any version of perl released in the last five years.
37
38       Although it may work on older versions of perl, no guarantee is made
39       that the minimum required version will not be increased.  The version
40       may be increased for any reason, and there is no promise that patches
41       will be accepted to lower the minimum required perl.
42

METHODS

44   new
45        my $table_log = Log::Dispatch::Array->new(\%arg);
46
47       This method constructs a new Log::Dispatch::Array output object.  Valid
48       arguments are:
49
50         array - a reference to an array to append to; defaults to an attr on
51                 $table_log
52
53   array
54       This method returns a reference to the array to which logging is being
55       performed.
56
57   log_message
58       This is the method which performs the actual logging, as detailed by
59       Log::Dispatch::Output.
60

AUTHOR

62       Ricardo SIGNES <cpan@semiotic.systems>
63

CONTRIBUTOR

65       Ricardo Signes <rjbs@semiotic.systems>
66
68       This software is copyright (c) 2008 by Ricardo SIGNES.
69
70       This is free software; you can redistribute it and/or modify it under
71       the same terms as the Perl 5 programming language system itself.
72
73
74
75perl v5.36.0                      2023-01-20           Log::Dispatch::Array(3)
Impressum