Beekeeper::Logger - Default logger used by worker processes.
Version 0.01
use Beekeeper::Worker ':log'; use base 'Beekeeper::Worker'; log_debug 'Ready';
By default all workers use a Beekeeper::Logger logger which logs errors and warnings both to files and to a topic on the message bus.
Beekeeper::Logger
Logs location can be specified with option log_file in config file pool.config.json.
log_file
pool.config.json
If no location is specified log files are are saved on /var/log when running pools as root, or /var/log/{user} when running as another user (if that directory already exists).
/var/log
/var/log/{user}
Log entries are also sent to a topic /topic/log in the message bus. The command line tool bkpr-log allows to inspect this topic in real time. Having a common topic for logs allows to easily shovel them to an external log management system.
/topic/log
bkpr-log
To replace this default log mechanism for another one of your choice, just override in your worker class the inherithed method log_handler.
log_handler
José Micó, jose.mico@gmail.com
jose.mico@gmail.com
Copyright 2015 José Micó.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language itself.
This software is distributed in the hope that it will be useful, but it is provided “as is” and without any express or implied warranties. For details, see the full text of the license in the file LICENSE.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'José'. Assuming UTF-8
To install Beekeeper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Beekeeper
CPAN shell
perl -MCPAN -e shell install Beekeeper
For more information on module installation, please visit the detailed CPAN module installation guide.