Supply
NAME
Lumberjack::Dispatcher::Supply - Dispatch Lumberjack messages to a Supply.
SYNOPSIS
use Lumberjack;
use Lumberjack::Dispatcher::Supply;
my $dispatcher = Lumberjack::Dispatcher::Supply.new;
$dispatcher.tap(-> $m { # do something with message });
Lumberjack.dispatchers.append: $dispatcher;
DESCRIPTION
This is a very simple dispatcher implementation that dispatches the
Lumberjack messages to a Supply
, this is provided for the convenience
of the Lumberjack::Application::WebSocket
, in conveying the messages
from the dispatch mechanism to the client connections, but may have a
more general use.
METHODS
method new
method new()
This takes the classes
and levels
parameters that are provided
for by Lumberjack::Provider
but has no other useful parameters.
method tap
This is a delegate from the underlying Supply that is provided for convenience.
attribute Supply
This is the Supply
to which the messages will be emitted.