Paranoid::Log::Buffer(3) Log Buffer Functions

VERSION

$Id: lib/Paranoid/Log/Buffer.pm, 2.01 2016/06/23 00:34:49 acorliss Exp $

SYNOPSIS


use Paranoid::Log;

startLogger('events', 'Buffer', PL_DEBUG, PL_GE);
startLogger('crit-events', 'buffer', PL_CRIT, PL_EQ, { size => 100 });
@messages = Paranoid::Log::Buffer::dumpBuffer($name);

DESCRIPTION k

This module implements named buffers to be used for logging purposes. Each buffer is an fixed length array of message records. Each message record consists of a two-element array, with the first element being the message time (in UNIX epoch seconds) and the second being the message text itself.

With the exception of the dumpBuffer function this module is not meant to be used directly. Paranoid::Log should be your exclusive interface for logging.

When creating a named buffer with Paranoid::Log you can specify a size option on a per-buffer basis. The default size is 20.

OPTIONS

The options recognized for use in the options hash are as follows:

    Option      Value       Description
    -----------------------------------------------------
    size        integer     number of entries to maintian 
                            in buffer

SUBROUTINES/METHODS

NOTE: Given that this module is not intended to be used directly nothing is exported.

init

logMsg

addLogger

delLogger

dumpBuffer

  @entries = Paranoid::Log::Buffer::dumpBuffer($name);

This dumps all current entries in the named buffer. Each entry is an array reference to a two-element array. The first element is the timestamp of the message (in UNIX epoch seconds), the second the actual message itself.

DEPENDENCIES

  • Paranoid::Debug

BUGS AND LIMITATIONS

AUTHOR

Arthur Corliss ([email protected])

LICENSE AND COPYRIGHT

This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information.

(c) 2005 - 2015, Arthur Corliss ([email protected])