Beekeeper::Logger - Default logger used by worker processes
Version 0.09
use Beekeeper::Worker ':log'; use base 'Beekeeper::Worker'; log_debug 'Ready'; log_warn 'Warning'; log_error 'Error';
By default all workers use a Beekeeper::Logger logger which logs errors and warnings both to files and to a topic log/{level}/{service} on the message bus.
log/{level}/{service}
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 at /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
This default log mechanism can be replaced overriding the method log_handler in worker classes.
log_handler
José Micó, jose.mico@gmail.com
jose.mico@gmail.com
Copyright 2015-2023 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.
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.