Alexander Hartmaier > Message-Passing-Output-Log-Any-Adapter > Message::Passing::Output::Log::Any::Adapter

Download:
Message-Passing-Output-Log-Any-Adapter-0.002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.002   Source  

NAME ^

Message::Passing::Output::Log::Any::Adapter - output messages via Log::Any::Adapter.

VERSION ^

version 0.002

SYNOPSIS ^

    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"]}'

DESCRIPTION ^

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.

METHODS ^

adapter_name

An attribute for the Log::Any::Adapter class.

adapter_params

An attribute for the parameters that get passed to the Log::Any::Adapter.

consume

Consumes a message by JSON encoding it and printing it, followed by \n

AUTHOR ^

Alexander Hartmaier <abraxxa@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 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.

syntax highlighting: