Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

log::agent::tag::callback(3pm) [debian man page]

Agent::Tag::Callback(3pm)				User Contributed Perl Documentation				 Agent::Tag::Callback(3pm)

NAME
Log::Agent::Tag::Callback - a dynamic tag string SYNOPSIS
require Log::Agent::Tag::Callback; # Inherits from Log::Agent::Tag. my $tag = Log::Agent::Tag::Callback->make( -name => "session id", -callback => Callback->new($obj, 'method', @args), -postfix => 1, -separator => " -- ", ); DESCRIPTION
This class represents a dynamic tag string, whose value is determined by invoking a pre-determined callback, which is described by a "Callback" object. You need to make your application depend on the "Callback" module from CPAN if you make use of this tagging feature, since "Log::Agent" does not depend on it, on purpose (it does not really use it, it only offers an interface to plug it in). At least version 1.02 must be used. CREATION ROUTINE PARAMETERS
The following parameters are defined, in alphabetical order: "-callback" => "Callback" object The callback to invoke to determine the value of the tag. The call is protected via a busy flag, in case there is an unwanted recursion due to a call to one of the logging routines whilst within the callback. If the callback is busy, the tag emitted is: callback "user" busy assuming "user" is the name you supplied via "-name" for this tag. "-name" => name The name of this tag. Used to flag a callback as busy in case there is an unwanted recursion into the callback routine. "-postfix" => flag Whether tag should be placed after or before the log message. By default, it is prepended to the log message, i.e. this parameter is false. "-separator" => string The separation string between the tag and the log message. A single space by default. AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com> SEE ALSO
Callback(3), Log::Agent::Tag(3), Log::Agent::Message(3). perl v5.10.0 2002-03-09 Agent::Tag::Callback(3pm)

Check Out this Related Man Page

Agent::Tag::Caller(3pm) 				User Contributed Perl Documentation				   Agent::Tag::Caller(3pm)

NAME
Log::Agent::Tag::Caller - formats caller information SYNOPSIS
Not intended to be used directly Inherits from Log::Agent::Tag. DESCRIPTION
This class handles caller information for Log::Agent services and is not meant to be used directly. This manpage therefore only documents the creation routine parameters that can be specified at the Log::Agent level via the "-caller" switch in the logconfig() routine. CALLER INFORMATION ENTITIES
This class knows about four entities: package, filename, line and subroutine, which are to be understood within the context of the Log::Agent routine being called (e.g. a logwarn() routine), namely: package This is the package name where the call to the logwarn() routine was made. It can be specified as "pack" for short, or spelled out completely. filename This is the file where the call to the logwarn() routine was made. It can be specified as "file" for short, or spelled out completely. line This is the line number where the call to the logwarn() routine was made, in file filename. The name is short enough to be spelled out completely. subroutine This is the subroutine where the call to the logwarn() routine was made. If the call is made outside a subroutine, this will be empty. The name is long enough to warrant the "sub" abbreviation if you don't wish to spell it out fully. CREATION ROUTINE PARAMETERS
The purpose of those parameters is to define how caller information entities (as defined by the previous section) will be formatted within the log message. "-display" => string Specifies a string with minimal variable substitution: only the caller information entities specified above, or their abbreviation, will be interpolated. For instance: -display => '($package::$sub/$line)' Don't forget to use simple quotes to avoid having Perl interpolate those as variables, or escape their leading "$" sign otherwise. Using this convention was deemed to more readable (and natural in Perl) than SGML entities such as "&pack;". Using this switch supersedes the "-info" and "-format" switches. "-format" => printf format Formatting instructions for the caller information entities listed by the "-info" switch. For instance: -format => "%s:%4d" if you have specified two entities in "-info". The special formatting macro %a stands for all the entities specified by "-info" and is rendered by a string where values are separated by ":". "-info" => "space separated list of parameters" Specifies a list of caller information entities that are to be formated using the "-format" specification. For instance: -info => "pack sub line" would only report those three entites. "-postfix" => flag Whether the string resulting from the formatting of the caller information entities should be appended to the regular log message or not (i.e. prepended, which is the default). "-separator" => string The separation string between the tag and the log message. A single space by default. AUTHORS
Raphael Manfredi <Raphael_Manfredi@pobox.com> created the module, it is currently maintained by Mark Rogaski <mrogaski@cpan.org>. Thanks to Jeff Boes for uncovering wackiness in caller(). LICENSE
Copyright (C) 1999 Raphael Manfredi. Copyright (C) 2002 Mark Rogaski; all rights reserved. See Log::Agent(3) or the README file included with the distribution for license information. SEE ALSO
Log::Agent(3), Log::Agent::Message(3). perl v5.10.0 2002-03-09 Agent::Tag::Caller(3pm)
Man Page