Log::Handler::Output::Gearman - Send log messages to Gearman workers.
use Log::Handler::Output::Gearman; my $logger = Log::Handler::Output::Gearman->new( servers => ['127.0.0.1:4731'], worker => 'logger', ); my $message = 'This is a log message'; $logger->log( $message );
This is experimental ( beta ) and should only be used in a test environment. The API may change at any time without prior notification until this message is removed!
Takes a number of arguments, following are mandatory:
servers
# hostname:port gearmand is running on servers => [ '127.0.0.1:4731', '192.168.0.1:4735', '192.168.0.2' # uses default port (4730) ]
worker
# name of the worker that should process the log messages worker => 'logger'
Besides it takes also following optional arguments:
method (default: do_background)
method => 'do_high_background'
This can be one of the following Gearman::XS::Client methods:
do
do_high
do_low
do_background
do_high_background
do_low_background
Takes one argument:
$message - The log message
$message
Returns the last error message.
Returns Gearman::XS::Client instance.
Reload with a new configuration.
Johannes Plunien <plu@cpan.org>
Copyright 2009 by Johannes Plunien
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Log::Handler
Gearman::XS::Client
http://www.gearman.org/
http://github.com/plu/log-handler-output-gearman/
To install Log::Handler::Output::Gearman, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Handler::Output::Gearman
CPAN shell
perl -MCPAN -e shell install Log::Handler::Output::Gearman
For more information on module installation, please visit the detailed CPAN module installation guide.