osx man page for log::message::handlers

Query: log::message::handlers

OS: osx

Section: 3pm

Links: osx man pages   all man pages

Forums: unix linux community   forum categories

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

Log::Message::Handlers(3pm)				 Perl Programmers Reference Guide			       Log::Message::Handlers(3pm)

NAME
Log::Message::Handlers - Message handlers for Log::Message
SYNOPSIS
# Implicitly used by Log::Message to serve as handlers for # Log::Message::Item objects # Create your own file with a package called # Log::Message::Handlers to add to the existing ones, or to even # overwrite them $item->carp; $item->trace;
DESCRIPTION
Log::Message::Handlers provides handlers for Log::Message::Item objects. The handler corresponding to the level (see Log::Message::Item manpage for an explanation about levels) will be called automatically upon storing the error. Handlers may also explicitly be called on an Log::Message::Item object if one so desires (see the Log::Message manpage on how to retrieve the Item objects). Default Handlers log Will simply log the error on the stack, and do nothing special carp Will carp (see the Carp manpage) with the error, and add the timestamp of when it occurred. croak Will croak (see the Carp manpage) with the error, and add the timestamp of when it occurred. cluck Will cluck (see the Carp manpage) with the error, and add the timestamp of when it occurred. confess Will confess (see the Carp manpage) with the error, and add the timestamp of when it occurred die Will simply die with the error message of the item warn Will simply warn with the error message of the item trace Will provide a traceback of this error item back to the first one that occurred, clucking with every item as it comes across it. Custom Handlers If you wish to provide your own handlers, you can simply do the following: o Create a file that holds a package by the name of "Log::Message::Handlers" o Create subroutines with the same name as the levels you wish to handle in the Log::Message module (see the Log::Message manpage for explanation on levels) o Require that file in your program, or add it in your configuration (see the Log::Message::Config manpage for explanation on how to use a config file) And that is it, the handler will now be available to handle messages for you. The arguments a handler may receive are those specified by the "extra" key, when storing the message. See the Log::Message manpage for details on the arguments.
SEE ALSO
Log::Message, Log::Message::Item, Log::Message::Config
AUTHOR
This module by Jos Boumans <kane@cpan.org>. Acknowledgements Thanks to Ann Barcomb for her suggestions.
COPYRIGHT
This module is copyright (c) 2002 Jos Boumans <kane@cpan.org>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. perl v5.16.2 2012-10-11 Log::Message::Handlers(3pm)
Related Man Pages
log::message::item(3) - centos
log::message::config(3pm) - osx
log::message::item(3pm) - osx
log::message::handlers(3pm) - suse
log::message::item(3pm) - suse
Similar Topics in the Unix Linux Community
Message Never got replied.
To print Coloured Prelogin Message on SOLARIS--9................
Extract Log lines with Thread-(regex)
Log File Creations for every 60 minutes
Searching Error Message from a log life between timestamp of every 10 minutes