SYNOPSIS

 sub cb($$$)
 {   my ($options, $reason, $message) = @_;
     ...
 }

 dispatcher Log::Report::Dispatcher::Callback => 'cb'
    , callback => \&cb;

 dispatcher CALLBACK => 'cb'   # same
    , callback => \&cb;

See SYNOPSIS in Log::Report::Dispatcher

DESCRIPTION

This basic file logger accepts a callback, which is called for each message which is to be logged. When you need complex things, you may best make your own extension to Log::Report::Dispatcher, but for simple things this will do.

See DESCRIPTION in Log::Report::Dispatcher

» Example:
  sub send_mail($$$)
  {   my ($disp, $options, $reason, $message) = @_;
      my $msg = Mail::Send->new(Subject => $reason
        , To => 'admin@localhost');
      my $fh  = $msg->open('sendmail');
      print $fh $disp->translate($reason, $message);
      close $fh;
  }

  dispatcher CALLBACK => 'mail', callback => \&send_mail;

DETAILS

Available back-ends

See Available back-ends in Log::Report::Dispatcher

Processing the message

Addition information

See Addition information in Log::Report::Dispatcher

Filters

See Filters in Log::Report::Dispatcher