NAME
NetSDS::Logger - syslog wrapper for applications and classes
SYNOPSIS
use NetSDS::Logger;
my $logger = NetSDS::Logger->new();
$logger->info("Syslog message here");
DESCRIPTION
This module contains implementation of logging functionality for NetSDS components.
By default, messages are logged with local0
facility and pid,ndelay,nowait
options.
NOTE: NetSDS::Logger
module is for internal use mostly from application frameworks like NetSDS::App
, NetSDS::App::FCGI
, etc.
CONSTRUCTOR
- new(%parameters)
-
Constructor new() creates new logger object and opens socket with default NetSDS logging parameters.
Arguments allowed (as hash):
- name - application name
-
This parameter may be used for identifying application in syslog messages
- facility - logging facility
-
If not set 'local0' is used as default value
my $object = NetSDS->new(%options);
OBJECT/CLASS METHODS
- log($level, $message) - write record to log
-
Wrapper to
syslog()
method of Unix::Syslog module.
DESTRUCTOR
Destructor (DESTROY method) calls closelog()
function. That's all.
EXAMPLES
See NetSDS::App for example.
BUGS
Unknown yet
SEE ALSO
TODO
1. Implement logging via UDP socket.
AUTHOR
Michael Bochkaryov <misha@rattler.kiev.ua>