Log::Agent::Message - a log message |
Log::Agent::Message - a log message
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\n"; # overloaded stringification
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.
The following routines are available:
append($str)
append_last($str)
prepend()
and append(), which is not the case today in
the basic Log::Agent framework).
make($string)
prepend($str)
prepend_first($str)
Raphael Manfredi <Raphael_Manfredi@pobox.com>
Log::Agent(3).
Log::Agent::Message - a log message |