Log::Log4perl::Layout::Syslog - Layout in Syslog format
Version 0.02
This format is useful with the Log::Dispatch::Syslog class. Add this to your configuration file:
log4perl.appender.A1=Log::Dispatch::Syslog log4perl.appender.A1.Filter=RangeAll log4perl.appender.A1.ident=bandsman log4perl.appender.A1.layout=Log::Log4perl::Layout::Syslog
Much of the actual formatting is done by the Sys::Syslog code called from Log::Dispatch::Syslog, however you can't use Log::Log4perl::Layout::NoopLayout since that doesn't insert the ident data that's needed by systems such as flutentd.
use Log::Log4perl::Layout::Syslog; my $layout = Log::Log4perl::Layout::Syslog->new();
Render a message in the correct format.
Nigel Horne, <njh at bandsman.co.uk>
<njh at bandsman.co.uk>
I can't work out how to get the ident given to Log::Dispatch::Syslog's constructor, so ident (facility in RFC3164 lingo) is always sent to LOG_USER.
Log::Log4perl Log::Dispatch::Syslog
You can find documentation for this module with the perldoc command.
perldoc Log-Log4perl-Layout-Syslog
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Log-Log4perl-Layout-Syslog
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Log-Log4perl-Layout-Syslog
CPAN Ratings
http://cpanratings.perl.org/d/Log-Log4perl-Layout-Syslog
Search CPAN
http://search.cpan.org/dist/Log-Log4perl-Layout-Syslog/
Copyright 2017 Nigel Horne.
This program is released under the following licence: GPL2
To install Log::Log4perl::Layout::Syslog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Log4perl::Layout::Syslog
CPAN shell
perl -MCPAN -e shell install Log::Log4perl::Layout::Syslog
For more information on module installation, please visit the detailed CPAN module installation guide.