Net::Dev::Tools::SyslogMessage - Perl library for Unix/Linux Syslog message parsing
use Net::Dev::Tools::SyslogMessage; my $msg = syslog_parseMessage($msgstr); syslog_dumpMessage(\*STDOUT, $msg);
This library is written entirely in Perl, based on, but not fully compliant to, IETF RFC 3164 - The BSD Syslog Protocol.
Returns the syslog facility name (string) that matches the given numerical code facilityCode. Returns undef if facilityCode is undefined or does not match any RFC 3164 numerical facility code.
facilityCode
undef
Returns the syslog facility numerical code (int, RFC 3164) that matches the given facilityName. Returns undef if facilityName is undefined or does not match any RFC 3164 facility code.
facilityName
Returns the syslog severity name (string) that matches the given numerical code severityCode. Returns undef if severityCode is undefined or does not match any RFC 3164 numerical severity code.
severityCode
Returns the syslog severity numerical code (int, RFC 3164) that matches the given severityName. Returns undef if severityName is undefined or does not match any RFC 3164 severity code.
severityName
Given facility and severity (RFC 3164) codes or names, returns packed syslog priority code (string). Returns undef if facility or severity are undefined.
string
facility
severity
Given a syslog priority numerical code (int), translates it in a list containing (in order) syslog facility code and severity code. Returns undef if priorityCode is undefined.
int
priorityCode
Prints textual form of a parsed syslog message hashref syslogMessageObj on stream outStream.
syslogMessageObj
outStream
Parses a received syslog message syslogMessageStr and returns a reference to a hash containing syslog message parsed elements.
syslogMessageStr
IETF RFC 3164 - The BSD Syslog Protocol <http://www.ietf.org/rfc/rfc3164.txt>
Dmitri Sologoubenko, <dmitri.sologoubenko@gmail.com>
Copyright (C) 2007 by Dmitri Sologoubenko
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.
To install Net::Dev::Tools::SyslogMessage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Dev::Tools::SyslogMessage
CPAN shell
perl -MCPAN -e shell install Net::Dev::Tools::SyslogMessage
For more information on module installation, please visit the detailed CPAN module installation guide.