Rechercher une page de manuel
RefDB::Log.3pm
Langue: en
Version: 2007-07-26 (mandriva - 01/05/08)
Section: 3 (Bibliothèques de fonctions)
NAME
RefDB::Log - Perl extension providing logging support for RefDB applicationsSYNOPSIS
use RefDB::Log;
my $log = RefDB::Log::->new("FILE", "INFO", "/var/log/testdata.out", "myapp.pl");
## this message should appear $log->log_print("ERR", "first test message");
## this message should not appear $log->log_print("DEBUG", "second test message");
$log->close();
DESCRIPTION
RefDB::Log defines a class that povides logging support to RefDB applications. After creating a Log object with appropriate settings for log level, log destination, the path to a log file (if logdest is ``File''), and a string that is prepended to log messages, calls to the log_print() function will send a log message to the appropriate destination if the log level permits this.
FEEDBACK
Send bug reports, questions, and comments to the refdb-users mailing list at:refdb-users@lists.sourceforge.net
For list information and archives, please visit:
http://lists.sourceforge.net/lists/listinfo/refdb-users
AUTHOR
Markus Hoenicka, markus@mhoenicka.deSEE ALSO
This module is part of the RefDB package, a reference manager and bibliography tool for markup languages. Please visit http://refdb.sourceforge.net for further information.new
Title : new
Usage : $pm = new RefDB::Log();
Function: Creates a new Log object
Argument: log destination (0|1|2 or STDERR|SYSLOG|FILE)
log level (0-7 or ALERT|CRIT|ERR|WARNING|NOTICE|INFO|DEBUG)
log file (path to custom log file if destination is 2)
prefix for log messages (denotes where the log is from)
Return : a Log object
num_loglevel
Title : num_loglevel
Usage : $level = log->num_loglevel(``ALERT'')
Function: Calculates the numeric log level from either a numeric or
alphanumeric value
Argument: log level (0-7 or ALERT|CRIT|ERR|WARNING|NOTICE|INFO|DEBUG)
Return : numeric log level
num_logdest
Title : num_logdest
Usage : $dest = log->num_logdest(``SYSLOG'')
Function: Calculates the numeric log destination from either a numeric or
alphanumeric value
Argument: log dest (0-2 or STDERR|SYSLOG|FILE)
Return : numeric log dest
log_print
Title : log_print
Usage : $log->log_print(``ERR'', ``could not open file'')
Function: sends a log message to the selected destination
Argument: priority (ALERT|CRIT|ERR|WARNING|NOTICE|INFO|DEBUG)
message
close
Title : close
Usage : $log->close()
Function: closes the log destination
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre