Log::Log4perl::Appender::Lumberjack - log appender writing to a lumberjack server
version 1.00
use Log::Log4perl; my $conf = q( log4perl.category = INFO, Remote # ... log4perl.appender.Remote = Log::Log4perl::Appender::Lumberjack log4perl.appender.Remote.host = 127.0.0.1 log4perl.appender.Remote.port = 5044 log4perl.appender.Remote.keepalive = 0 log4perl.appender.Remote.frame_format = json #log4perl.appender.Remote.use_ssl = 1 #log4perl.appender.Remote.ssl_verify = 1 # these two options prevent the message from being stringified log4perl.appender.Remote.layout = Log::Log4perl::Layout::NoopLayout log4perl.appender.Remote.warp_message = 0 ); Log::Log4perl::init( \$conf ); my $log = Log::Log4perl::get_logger("Foo::Bar"); $log->info('just for information...');
Host to connect to.
TCP port to connect to.
If enabled connection will be keept open between send_data() calls. Otherwise it will be closed and reopened on every call.
Needs to be disabled for logstash-input-beats since it expects only one bulk of frames per connection.
The following frame formats are supported:
Uses json formatted data frames as defined in lumberjack protocol v2. (type 'J')
Uses lumberjack DATA (type 'D') frames as defined in lumberjack protocol v1.
This format only supports a flat hash structure.
Enable SSL transport encryption.
Enable verification of SSL server certificate.
Use a non-default CA file to retrieve list of trusted root CAs.
Otherwise the system wide default will be used.
Use a non-default CA path to retrieve list of trusted root CAs.
Use a non-default SSL protocol version string.
Check IO::Socket::SSL for string format.
Use a hostname other than the hostname give in 'host' for SSL certificate verification.
This could be used if you use a IP address to connecting to server that only lists the hostname in its certificate.
If 'ssl_cert_file' and 'ssl_key_file' is the client will enable client side authentication and use the supplied certificate/key.
Markus Benning <ich@markusbenning.de>
This software is copyright (c) 2016 by Markus Benning.
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 Log::Log4perl::Appender::Lumberjack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Log4perl::Appender::Lumberjack
CPAN shell
perl -MCPAN -e shell install Log::Log4perl::Appender::Lumberjack
For more information on module installation, please visit the detailed CPAN module installation guide.