Log::Syslog::Abstract - Use any available syslog API
Version 1.000
use Log::Syslog::Abstract qw(openlog syslog closelog); openlog( 'myapp', 'pid,ndelay', 'local0' ); ... syslog('info', '%s: %s', 'Something bad happened', $!); ... closelog();
This module provides the bare minimum common API to Unix::Syslog and Sys::Syslog, using whichever one happens to be available.
Opens a connection to the system logger.
$ident is an identifier string that syslog will include in every message. It is normally set to the process name.
$options is a comma-separated list of options. Valid options are:
Don't delay open until first syslog() call
Log the process ID with each message
$facility is a string indicating the syslog facility to be used. Valid values are:
Generates a log message and passes it to the appropriate syslog backend.
$priority should be a string containing one of the valid priority names:
$format is a format string in the style of printf(3)
@args is a list of values that will replace the placeholders in $format
Closes the connection to syslog.
Nothing is exported by default. Specify what you need on the use() line, or call with package-qualified name.
Sub::Exporter.
Also, at least one of Unix::Syslog or Sys::Syslog must be present, or Log::Syslog::Abstract will die at use() time.
Dave O'Neill, <dmo at roaringpenguin.com>
<dmo at roaringpenguin.com>
Currently, no validation is performed on the strings provided for options, facility names, or message priority. Bogus data may give bizzare results.
Please report any bugs or feature requests to bug-log-syslog-abstract at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Log-Syslog-Abstract. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-log-syslog-abstract at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Log::Syslog::Abstract
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Log-Syslog-Abstract
CPAN Ratings
http://cpanratings.perl.org/d/Log-Syslog-Abstract
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Log-Syslog-Abstract
Search CPAN
http://search.cpan.org/dist/Log-Syslog-Abstract
Copyright 2007 Dave O'Neill
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Log::Syslog::Abstract, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Syslog::Abstract
CPAN shell
perl -MCPAN -e shell install Log::Syslog::Abstract
For more information on module installation, please visit the detailed CPAN module installation guide.