Proxy

NAME

Lumberjack::Dispatcher::Proxy - dispatch lumberjack messages to a web server

SYNOPSIS


use Lumberjack;
use Lumberjack::Dispatcher::Proxy;

Lumberjack.dispatchers.append: Lumberjack::Dispatcher::Proxy.new(url => 'http://localhost:8898/log');

# Now all messages will be dispatched to the web endpoint as well as the other dispatchers

DESCRIPTION

This implements a Lumberjack::Dispatcher that will POST the messages serialised as JSON to the specified URL. Typically the endpoint will be provided by a Lumberjack::Application::PSGI application which knows how to deserialise and re-dispatch the messages, but you can equally provide your own if you have different requirements.

METHODS

method new

method new(:$url!, :$username, :$password)

As well as the classes and levels matchers provided for by the Lumberjack::Dispatcher role, this has a required url parameter that should be the URI of a web service that will accept an 'application/json' POST of the message data. Additionally if the username and password parameters are provided, it will attempt to authenticate with the HTTP server, currently only basic authentication is provided, though other mechanisms may become available in the future.

Lumberjack::Application v0.0.10

A web facility for the Lumberjack logging framework

Authors

  • Jonathan Stowe

License

Artistic-2.0

Dependencies

Lumberjack:ver<0.1.2+>Lumberjack::Message::JSON:ver<0.0.3+>HTTP::UserAgentHTTP::Server::TinyCrustWebSocketJSON::ClassTemplate6

Test Dependencies

Provides

  • Lumberjack::Application
  • Lumberjack::Application::Index
  • Lumberjack::Application::PSGI
  • Lumberjack::Application::WebSocket
  • Lumberjack::Dispatcher::Proxy
  • Lumberjack::Dispatcher::Supply
  • Lumberjack::Template::Provider

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.