Digital Mages

Digital Mages - Paranoid::Log::Buffer(3)

Paranoid::Log::Buffer

Section: User Contributed Perl Documentation (3)
Updated: 2017-02-06
Index  

NAME

Paranoid::Log::Buffer - Log Buffer Functions  

VERSION

$Id: lib/Paranoid/Log/Buffer.pm, 2.05 2017/02/06 01:48:57 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 licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information.

(c) 2005 - 2017, Arthur Corliss (corliss@digitalmages.com)


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION k
OPTIONS
SUBROUTINES/METHODS
init
logMsg
addLogger
delLogger
dumpBuffer
DEPENDENCIES
SEE ALSO
BUGS AND LIMITATIONS
AUTHOR
LICENSE AND COPYRIGHT