Message::Passing::Output::Log::Any::Adapter - output messages via Log::Any::Adapter.
version 0.004
use Message::Passing::Output::Log::Any::Adapter; my $logger = Message::Passing::Output::Log::Any::Adapter->new( adapter_name => 'File', adapter_params => [ '/var/log/foo.log' ], ); $logger->consume( 'message' ); # or directly on the command line: # message-pass --input STDIN --output Log::Any::Adapter --output_options \ # '{"adapter_name":"File","adapter_params":["/var/log/foo.log"]}'
Provides a very flexible output by using Log::Any Adapter that in turn can use Log::Log4perl or Log::Dispatch to forward the messages.
The log level is not configurable at the moment and defaults to info.
An attribute for the Log::Any::Adapter class.
An attribute for the parameters that get passed to the Log::Any::Adapter.
Consumes a message by JSON encoding it and printing it, followed by \n
Alexander Hartmaier <abraxxa@cpan.org>
This software is copyright (c) 2018 by Alexander Hartmaier.
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 Message::Passing::Output::Log::Any::Adapter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Message::Passing::Output::Log::Any::Adapter
CPAN shell
perl -MCPAN -e shell install Message::Passing::Output::Log::Any::Adapter
For more information on module installation, please visit the detailed CPAN module installation guide.