1Log::Report::DispatcherU:s:eLrogCDoinstpraitbcuht(e3d)PLeorgl::DRoecpuomretn:t:aDtiisopnatcher::LogDispatch(3)
2
3
4

NAME

6       Log::Report::Dispatcher::LogDispatch - send messages to Log::Dispatch
7       back-end
8

INHERITANCE

10        Log::Report::Dispatcher::LogDispatch
11          is a Log::Report::Dispatcher
12

SYNOPSIS

14        use Log::Dispatch::File;
15        dispatcher Log::Dispatch::File => 'logger', accept => 'NOTICE-'
16          , filename => 'logfile', to_level => [ 'ALERT-' => 'err' ];
17
18        # disable default dispatcher
19        dispatcher close => 'logger';
20

DESCRIPTION

22       This dispatchers produces output to and "Log::Dispatch" back-end.
23       (which will NOT be automatically installed for you).
24
25       The REASON for a message often uses names which are quite similar to
26       the log-levels used by Log::Dispatch.  However: they have a different
27       approach.  The REASON of Log::Report limits the responsibility of the
28       programmer to indicate the cause of the message: whether it was able to
29       handle a certain situation.  The Log::Dispatch levels are there for the
30       user's of the program.  However: the programmer does not known anything
31       about the application (in the general case).  This is cause of much of
32       the trickery in Perl programs.
33
34       The default translation table is list below.  You can change the
35       mapping using new(to_level).  See example in SYNOPSIS.
36
37       Extends "DESCRIPTION" in Log::Report::Dispatcher.
38

METHODS

40       Extends "METHODS" in Log::Report::Dispatcher.
41
42   Constructors
43       Extends "Constructors" in Log::Report::Dispatcher.
44
45       $obj->close()
46           Inherited, see "Constructors" in Log::Report::Dispatcher
47
48       Log::Report::Dispatcher::LogDispatch->new($type, $name, %options)
49           The Log::Dispatch infrastructure has quite a large number of output
50           TYPEs, each extending the Log::Dispatch::Output base-class.  You do
51           not create these objects yourself: Log::Report is doing it for you.
52
53           The Log::Dispatch back-ends are very careful with validating their
54           parameters, so you will need to restrict the options to what is
55           supported for the specific back-end.  See their respective manual-
56           pages.  The errors produced by the back-ends quite horrible and
57           untranslated, sorry.
58
59            -Option       --Defined in             --Default
60             accept         Log::Report::Dispatcher  depend on mode
61             callbacks                               []
62             charset        Log::Report::Dispatcher  <undef>
63             format_reason  Log::Report::Dispatcher  'LOWERCASE'
64             locale         Log::Report::Dispatcher  <system locale>
65             max_level                               undef
66             min_level                               debug
67             mode           Log::Report::Dispatcher  'NORMAL'
68             to_level                                []
69
70           accept => REASONS
71           callbacks => CODE|ARRAY-of-CODE
72             See Log::Dispatch::Output.
73
74           charset => CHARSET
75           format_reason => 'UPPERCASE'|'LOWERCASE'|'UCFIRST'|'IGNORE'|CODE
76           locale => LOCALE
77           max_level => LEVEL
78             Like "min_level".
79
80           min_level => LEVEL
81             Restrict the messages which are passed through based on the
82             LEVEL, so after the reason got translated into a Log::Dispatch
83             compatible LEVEL.  The default will use Log::Report restrictions
84             only.
85
86           mode => 'NORMAL'|'VERBOSE'|'ASSERT'|'DEBUG'|0..3
87           to_level => ARRAY-of-PAIRS
88             See reasonToLevel().
89
90   Accessors
91       Extends "Accessors" in Log::Report::Dispatcher.
92
93       $obj->backend()
94           Returns the Log::Dispatch::Output object which is used for logging.
95
96       $obj->isDisabled()
97           Inherited, see "Accessors" in Log::Report::Dispatcher
98
99       $obj->mode()
100           Inherited, see "Accessors" in Log::Report::Dispatcher
101
102       $obj->name()
103           Inherited, see "Accessors" in Log::Report::Dispatcher
104
105       $obj->needs( [$reason] )
106           Inherited, see "Accessors" in Log::Report::Dispatcher
107
108       $obj->type()
109           Inherited, see "Accessors" in Log::Report::Dispatcher
110
111   Logging
112       Extends "Logging" in Log::Report::Dispatcher.
113
114       $obj->addSkipStack(@CODE)
115       Log::Report::Dispatcher::LogDispatch->addSkipStack(@CODE)
116           Inherited, see "Logging" in Log::Report::Dispatcher
117
118       $obj->collectLocation()
119       Log::Report::Dispatcher::LogDispatch->collectLocation()
120           Inherited, see "Logging" in Log::Report::Dispatcher
121
122       $obj->collectStack( [$maxdepth] )
123       Log::Report::Dispatcher::LogDispatch->collectStack( [$maxdepth] )
124           Inherited, see "Logging" in Log::Report::Dispatcher
125
126       $obj->log(HASH-$of-%options, $reason, $message, $domain)
127           Inherited, see "Logging" in Log::Report::Dispatcher
128
129       $obj->reasonToLevel($reason)
130           Returns a level which is understood by Log::Dispatch, based on a
131           translation table.  This can be changed with new(to_level).
132
133       $obj->skipStack()
134           Inherited, see "Logging" in Log::Report::Dispatcher
135
136       $obj->stackTraceLine(%options)
137       Log::Report::Dispatcher::LogDispatch->stackTraceLine(%options)
138           Inherited, see "Logging" in Log::Report::Dispatcher
139
140       $obj->translate(HASH-$of-%options, $reason, $message)
141           Inherited, see "Logging" in Log::Report::Dispatcher
142

DETAILS

144       Extends "DETAILS" in Log::Report::Dispatcher.
145

SEE ALSO

147       This module is part of Log-Report distribution version 1.33, built on
148       July 17, 2021. Website: http://perl.overmeer.net/CPAN/
149

LICENSE

151       Copyrights 2007-2021 by [Mark Overmeer <markov@cpan.org>]. For other
152       contributors see ChangeLog.
153
154       This program is free software; you can redistribute it and/or modify it
155       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
156
157
158
159perl v5.34.0                      2022-0L1o-g2:1:Report::Dispatcher::LogDispatch(3)
Impressum