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::Driver::Syslog(3pm)				User Contributed Perl Documentation				Agent::Driver::Syslog(3pm)

NAME
Log::Agent::Driver::Syslog - syslog logging driver for Log::Agent SYNOPSIS
use Log::Agent; require Log::Agent::Driver::Syslog; my $driver = Log::Agent::Driver::Syslog->make( -prefix => prefix, -facility => "user", -showpid => 1, -socktype => "unix", -logopt => "ndelay", ); logconfig(-driver => $driver); DESCRIPTION
The syslog logging driver delegates logxxx() operations to syslog() via the Sys::Syslog(3) interface. The creation routine make() takes the following switches: "-facility" => facility Tell syslog() which facility to use (e.g. "user", "auth", "daemon"). Unlike the Sys::Syslog(3) interface, the facility is set once and for all: every logging message will use the same facility. If you wish to log something to "auth" for instance, then do so via Sys::Syslog directly: there is no guarantee that the application will configure its Log::Agent to use syslog anyway! "-logopt" => syslog options Specifies logging options, under the form of a string containing zero or more of the words ndelay, cons or nowait. "-prefix" => prefix The prefix here is syslog's identification string. "-showpid" => flag Set to true to have the PID of the process logged. It is false by default. "-socktype" => (unix | inet) Specifies the logging socket type to use. The default behaviour is to use Sys:Syslog's default. CHANNELS
All the channels go to syslog(), of course. AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com> SEE ALSO
Log::Agent::Driver(3), Log::Agent::Channel::Syslog(3). perl v5.10.0 2002-03-09 Agent::Driver::Syslog(3pm)
Man Page