Manfred Stock > Plack-Middleware-AccessLog-Structured-ZeroMQ-0.001000 > Plack::Middleware::AccessLog::Structured::ZeroMQ

Download:
Plack-Middleware-AccessLog-Structured-ZeroMQ-0.001000.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.001000   Source  

NAME ^

Plack::Middleware::AccessLog::Structured::ZeroMQ - Access log middleware which passes structured log messages into ZeroMQ

VERSION ^

version 0.001000

SYNOPSIS ^

        use Plack::Middleware::AccessLog::Structured::ZeroMQ;

        Plack::Middleware::AccessLog::Structured::ZeroMQ->wrap($app,
                connect     => 'tcp://127.0.0.1:5552',
                callback    => sub {
                        my ($env, $message) = @_;
                        $message->{foo} = 'bar';
                        return $message;
                },
                extra_field => {
                        'some.application.field' => 'log_field',
                        'some.psgi-env.field'    => 'another_log_field',
                },
        );

DESCRIPTION ^

Plack::Middleware::AccessLog::Structured::ZeroMQ is a Plack::Middleware which sends structured, JSON-encoded log messages into a ZeroMQ message queue. It is a subclass of Plack::Middleware::AccessLog::Structured and thus uses its log messages.

METHODS ^

new

Constructor, creates new instance. See also the base class Plack::Middleware::AccessLog::Structured for additional parameters. Please note that you should not pass the logger parameter to Plack::Middleware::AccessLog::Structured::ZeroMQ as that would override the default of passing log messages into ZeroMQ.

Parameters

This method expects its parameters as a hash reference.

connect

The address of the ZeroMQ endpoint to send the data to. Defaults to tcp://127.0.0.1:5552.

Result

A fresh instance of the middleware.

SEE ALSO ^

AUTHOR ^

Manfred Stock <mstock@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 by Manfred Stock.

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: