NetSDS::Logger - syslog wrapper for applications and classes
use NetSDS::Logger; my $logger = NetSDS::Logger->new(); $logger->log("info", "Syslog message here");
This module contains implementation of logging functionality for NetSDS components.
By default, messages are logged with local0 facility and pid,ndelay,nowait options.
local0
pid,ndelay,nowait
NOTE: NetSDS::Logger module is for internal use mostly from application frameworks like NetSDS::App, NetSDS::App::FCGI, etc.
NetSDS::Logger
NetSDS::App
NetSDS::App::FCGI
Constructor new() creates new logger object and opens socket with default NetSDS logging parameters.
Arguments allowed (as hash):
This parameter may be used for identifying application in syslog messages
If not set 'local0' is used as default value
my $object = NetSDS->new(%options);
Wrapper to syslog() method of Unix::Syslog module.
syslog()
Level is passed as string and may be one of the following:
alert - LOG_ALERT crit - LOG_CRIT debug - LOG_DEBUG emerg - LOG_EMERG error - LOG_ERR info - LOG_INFO notice - LOG_NOTICE warning - LOG_WARNING
Destructor (DESTROY method) calls closelog() function. That's all.
closelog()
See NetSDS::App for example.
Unknown yet
Sys::Syslog
1. Implement logging via UDP socket.
Michael Bochkaryov <misha@rattler.kiev.ua>
To install NetSDS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm NetSDS
CPAN shell
perl -MCPAN -e shell install NetSDS
For more information on module installation, please visit the detailed CPAN module installation guide.