Log::Agent::Driver::Fork3pm
Dummy driver for forking output to multiple drivers
Usage
use Log::Agent;require Log::Agent::Driver::Fork;require Log::Agent::Driver::Foo;require Log::Agent::Driver::Bar;my $driver = Log::Agent::Driver::Fork->make(Log::Agent::Driver::Foo->make( ... ),Log::Agent::Driver::Bar->make( ... ));logconfig(-driver => $driver);
Overview
This driver merely acts a multiplexer for logxxx() calls, duplicating them and distributing them to other drivers.
The only routine of interest here is the creation routine:
- make(@drivers)
-
Create a Log::Agent::Driver::Fork driver that duplicates
logxxx()calls and distributes them to the drivers in@drivers. The arguments must be the return value of themake()call for the client drivers.
Notes
Many thanks go to Daniel Lundin and Jason May who proposed this module independently. Eventually, logconfig() will support multiple drivers directly. But, for now, this solution requires no change to the existing interface.
Releases
11 releases since Debian 3.1 (Sarge); the text changed 6 times.