Beekeeper::Service::LogTail::Worker - Buffer log entries
Version 0.09
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}
This worker keeps an in-memory buffer of every log entry sent to these topics in every broker of a logical message bus. Then this buffer can be queried using the tail method provided by Beekeeper::Service::LogTail or using the command line client bkpr-log.
tail
By default the buffer holds the last 20000 log entries (this can be changed setting the buffer_entries configuration option). Buffered entries consume 1.5 kiB for messages of 100 bytes, increasing to 2 KiB for messages of 500 bytes. Holding the last million log entries in memory will consume around 2 GiB (!).
buffer_entries
LogTail workers are CPU bound and can collect up to 20000 log entries per second. Applications exceeding that traffic will need another strategy to consolidate log entries from brokers.
LogTail workers are not created automatically. In order to add a LogTail worker to a pool it must be declared into config file pool.config.json:
pool.config.json
[ { "pool_id" : "myapp", "bus_id" : "backend", "workers" : { "Beekeeper::Service::LogTail::Worker" : { "buffer_entries": 100000 }, ... }, }, ]
Beekeeper::Service::LogTail, which is the interface to the RPC methods exposed by this worker class.
José Micó, jose.mico@gmail.com
jose.mico@gmail.com
Copyright 2015-2021 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.