Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

Agent::Message(3pm)					User Contributed Perl Documentation				       Agent::Message(3pm)

NAME
Log::Agent::Message - a log message SYNOPSIS
require Log::Agent::Message; my $msg = Log::Agent::Message->make("string"); $msg->prepend("string"); $msg->append("string"); my $copy = $msg->clone; print "Message is $msg "; # overloaded stringification DESCRIPTION
The Log::Agent::Message class represents an original log message (a string) to which one may prepend or append other strings, but with the special property that prepended strings aggregate themselves in FIFO order, whilst appended strings aggregate themselves in LIFO order, which is counter-intuitive at first sight. In plain words, this means that the last routine that prepends something to the message will get its prepended string right next to the original string, regardless of what could have been prepended already. The behaviour is symetric for appending. INTERFACE
The following routines are available: append($str) Append suppled string $str to the original string (given at creation time), at the head of all existing appended strings. append_last($str) Append suppled string $str to the original string (given at creation time), at the tail of all existing appended strings. clone Clone the message. This is not a shallow clone, because the list of prepended and appended strings is recreated. However it is not a deep clone, because the items held in those lists are merely copied (this would matter only when other objects with overloaded stringification routines were supplied to prepend() and append(), which is not the case today in the basic Log::Agent framework). make($string) This is the creation routine. prepend($str) Prepend supplied string $str to the original string (given at creation time), at the tail of all existing prepended strings. prepend_first($str) Prepend supplied string $str to the original string (given at creation time), at the head of all existing prepended strings. stringify This is the overloaded "" operator, which returns the complete string composed of all the prepended strings, the original string, and all the appended strings. AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com> SEE ALSO
Log::Agent(3). perl v5.10.0 2002-03-09 Agent::Message(3pm)

Check Out this Related 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)
Man Page