Terminate the dispatcher activities. The dispatcher gets disabled,
to avoid the case that it is accidentally used. Returns undef
(false)
if the dispatcher was already closed.
Create a dispatcher. The $type of back-end to start is required, and listed in the DESCRIPTION part of this manual-page. For various external back-ends, special wrappers are created.
The $name must be uniquely identifying this dispatcher. When a second dispatcher is created (via Log::Report::dispatcher()) with the name of an existing dispatcher, the existing one will get replaced.
All %options which are not consumed by this base constructor are passed to the wrapped back-end. Some of them will check whether all %options are understood, other ignore unknown %options.
Option | Default |
---|---|
accept |
|
charset | <undef> |
format_reason | 'LOWERCASE' |
locale | <system locale> |
mode | 'NORMAL' |
Returns the unique name of this dispatcher.
Returns the list with all REASONS which are needed to fulfill this dispatcher's needs. When disabled, the list is empty, but not forgotten.
[0.999] when only one $reason is specified, it is returned if in the list.
The dispatcher $type, which is usually the same as the class of this object, but not in case of wrappers like for Log::Dispatch.
[1.13] Add one or more CODE blocks of caller lines which should not be collected for stack-traces or location display. A CODE gets called with an ARRAY of caller information, and returns true when that line should get skipped.
Warning: this logic is applied globally: on all dispatchers.
By default, all lines in the Log::Report packages are skipped from display, with a simple CODE as this:
sub in_lr { $_[0][0] =~ m/^Log\:\:Report(?:\:\:|$)/ } Log::Report::Dispatcher->addSkipStack(\&in_lr);
The only parameter to in_lr is the return of caller(). The first element of that ARRAY is the package name of a stack line.
Collect the information to be displayed as line where the error occurred.
Returns an ARRAY of ARRAYs with text, filename, line-number.
This method is called by Log::Report::report() and should not be called directly. Internally, it will call translate(), which does most $of the work.
[1.13] Returns the number of nestings in the stack which should be skipped to get outside the Log::Report (and related) modules. The end-user does not want to see those internals in stack-traces.
Option | Default |
---|---|
abstract | 1 |
call | <required> |
filename | <required> |
linenr | <required> |
max_line |
|
max_params | 8 |
package | <required> |
params | <required> |
See Processing the message, which describes the actions taken by this method. A string is returned, which ends on a new-line, and may be multi-line (in case a stack trace is produced).