Taxi::Mysql::Logger - extendable full-text index using mysql: logger class |
Taxi::Mysql::Logger - extendable full-text index using mysql: logger class
##======================================================================== ## PRELIMINARIES
use Taxi::Mysql::Logger;
##======================================================================== ## Constructors etc.
$thingy = $CLASS_OR_OBJ->new(%args); $obj2 = $obj->clone();
##======================================================================== ## API: Properties
\%vlevels = $class_or_obj->vlevels(); $verbose = $class_or_obj->verbose(); $logFile = $class_or_obj->logFile(); $logName = $class_or_obj->logName(); $logClass = $class_or_obj->logClass(); $bool = $class->logTime(); $bool = $class->logPid(); $str = $class_or_obj->logPrefix();
##======================================================================== ## API: level checking
$bool = $class_or_obj->contains($verboseLevel, $msgLevel);
##======================================================================== ## API: Messages
undef = $class_or_obj->_print(@msg); undef = $class_or_obj->vlmsg($msgLevel, $logLevel, @msg); undef = $class_or_obj->vmsg($msgLevel, @msg); undef = $class_or_obj->vmsg1($msgLevel, @msg);
Symbolic verbosity level resolution hash. Keys are symbolic verbosity level names, values are regular expressions of elementary verbosity level names matching the key. Currently defined as:
( 'silent' => '(?:^$)', 'none' => '(?:^$)', 'errors' => '(?:error)', 'error' => '(?:error)', 'warnings' => '(?:error|warn)', 'warn' => '(?:error|warn)', 'info' => '(?:error|warn|info)', 'progress' => '(?:error|warn|info|progress)', 'debug' => '(?:error|warn|info|progress|debug)',
'trace' => '(?:trace)',
'default' => 'progress', )
Taxi::Mysql::Logger exports the %VLEVELS hash under the tag ':verbose'.
$thingy = $CLASS_OR_OBJ->new(%args);
Object structure / keyword %args:
{ ##-- verbosity behavior verbose => $vlevel, ##-- default: 'default' vlevels => \%vlevels, ##-- default: \%vlevels,
##-- log file logFile => $filespec, ##-- default: '>>&STDERR', logName => $logName, ##-- default log name (default: ref($that)||$that) logClass => $logClass, ##-- log name class (default: none) }
$obj2 = $obj->clone();
Deep copy using Storable::dclone().
\%vlevels = $class_or_obj->vlevels();
Get verbosity level resolution hash.
$verbose = $class_or_obj->verbose();
Get verbosity level.
$logFile = $class_or_obj->logFile();
Get selected log file.
$logName = $class_or_obj->logName();
Get selected name for logging.
$logClass = $class_or_obj->logClass();
Get selected 'class' (not really a perl class, just another symbolic name) for logging.
$bool = $class->logTime();
Get time-logging flag.
$bool = $class->logPid();
Get PID-logging flag.
$str = $class_or_obj->logPrefix();
Get logging prefix string.
$bool = $class_or_obj->contains($verboseLevel, $msgLevel);
Returns true iff $verboseLevel contains $msgLevel.
undef = $class_or_obj->_print(@msg);
Basically just a print(). No level-checking is performed.
undef = $class_or_obj->vlmsg($msgLevel, $logLevel, @msg);
Level-sensitive _print()
using $logLevel (instead of $class_or_obj->verbose()).
Single-line level-sensitive _print(). Prefixes logged message
with logPrefix()
and calls vlmsg().
undef = $class_or_obj->vmsg($msgLevel, @msg);
Object-based level-sensitive _print(), for use by subclasses.
undef = $class_or_obj->vmsg1($msgLevel, @msg);
Object-based single-line level-sensitive _print(), for use by subclasses.
Perl by Larry Wall.
Bryan Jurish <moocow@ling.uni-potsdam.de>
Copyright (C) 2006 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
perl(1), Taxi::Mysql(3perl), Taxi::Mysql::Base(3perl).
Taxi::Mysql::Logger - extendable full-text index using mysql: logger class |