Net::SyslogNg - client module for writing to syslog server (rfc5424)
version 0.03
use Net::SyslogNg; # Create Net::SyslogNg object my $syslog = Net::SyslogNg->new( '-syslog_host' => '127.0.0.1', '-syslog_port' => 514, ); # Send message to syslog $syslog->send( '-facility' => 'daemon', '-priority' => 'error', '-msg' => 'Syslog error message', );
Create Net::SyslogNg object
Options: -syslog_host => Syslog host address -syslog_port => Syslog port number -facility => Facility name -priority => Priority name -debug => Enable printing debug messages (default: 0)
Send message to syslog daemon
Options: -facility => Facility name -priority => Priority name -pid => Process id number (default: current process id) -msg => String of message -version => Version number (default: 1) -timestamp => Timestamp of message (default: current time in UTC) -hostname => Hostname of syslog client (default: current hostname) -message_id => Message id -structured_data => Structured data field -application => Application name
Sys::Hostname, IO::Socket::INET, DateTime
Pavel Andryushin <vrag867@gmail.com>
This software is copyright (c) 2020 by Pavel Andryushin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::SyslogNg, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SyslogNg
CPAN shell
perl -MCPAN -e shell install Net::SyslogNg
For more information on module installation, please visit the detailed CPAN module installation guide.