NAME

Paranoid::Log::Buffer - Log Buffer Functions

VERSION

$Id: lib/Paranoid/Log/Buffer.pm, 2.10 2022/03/08 00:01:04 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

o

Paranoid::Debug

SEE ALSO

o

Paranoid::Log

BUGS AND LIMITATIONS

AUTHOR

Arthur Corliss (corliss@digitalmages.com)

LICENSE AND COPYRIGHT

This software is free software. Similar to Perl, you can redistribute it and/or modify it under the terms of either:

a)     the GNU General Public License
       <https://www.gnu.org/licenses/gpl-1.0.html> as published by the 
       Free Software Foundation <http://www.fsf.org/>; either version 1
       <https://www.gnu.org/licenses/gpl-1.0.html>, or any later version
       <https://www.gnu.org/licenses/license-list.html#GNUGPL>, or
b)     the Artistic License 2.0
       <https://opensource.org/licenses/Artistic-2.0>,

subject to the following additional term: No trademark rights to "Paranoid" have been or are conveyed under any of the above licenses. However, "Paranoid" may be used fairly to describe this unmodified software, in good faith, but not as a trademark.

(c) 2005 - 2020, Arthur Corliss (corliss@digitalmages.com) (tm) 2008 - 2020, Paranoid Inc. (www.paranoid.com)