Log::Dispatch::Perl(3pm)

Log::Dispatch::Perl3pm

Use core perl functions for logging

Usage

 use Log::Dispatch::Perl ();
 my $dispatcher = Log::Dispatch->new;
 $dispatcher->add( Log::Dispatch::Perl->new(
  name      => 'foo',
  min_level => 'info',
  action    => { debug     => '',
                 info      => '',
                 notice    => 'warn',
                 warning   => 'warn',
                 error     => 'die',
                 critical  => 'die',
                 alert     => 'croak',
                 emergency => 'croak',
               },
 ) );
 $dispatcher->warning( "This is a warning" );

Version

version 0.05

Overview

The "Log::Dispatch::Perl" module offers a logging alternative using standard Perl core functions. It allows you to fall back to the common Perl alternatives for logging, such as "warn" and "cluck". It also adds the possibility for a logging action to halt the current environment, such as with "die" and "croak".

Possible actions

The following actions are currently supported (in alphabetical order):

(absent or empty string or undef)

Indicates no action should be executed. Default for log levels "debug" and "info".

carp

Indicates a "carp" action should be executed. See "carp" in Carp. Halts execution.

cluck

Indicates a "cluck" action should be executed. See "cluck" in Carp. Does not halt execution.

confess

Indicates a "confess" action should be executed. See "confess" in Carp. Halts execution.

croak

Indicates a "croak" action should be executed. See "croak" in Carp. Halts execution.

die

Indicates a "die" action should be executed. See "die" in perlfunc. Halts execution.

warn

Indicates a "warn" action should be executed. See "warn" in perlfunc. Does not halt execution.

Support

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Log-Dispatch-Perl> (or [email protected] <mailto:[email protected]>).

I am also usually active on irc, as 'ether' at "irc.perl.org" and "irc.freenode.org".

Contributor

Karen Etheridge <[email protected]>

Releases

6 releases since Debian 8 (Jessie); the text changed 2 times.

  1. 8
  2. 9–10
  3. 11–13

Author

Elizabeth Mattijsen ([email protected])

From liblog-dispatch-perl-perl 0.05-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.