NAME
Beekeeper::Service::LogTail - Buffer log entries
VERSION
Version 0.03
SYNOPSIS
my $l = Beekeeper::Service::LogTail->tail(
count => 100,
level => LOG_DEBUG,
host => '.*',
pool => '.*',
service => 'myapp-foo',
message => 'Use of uninitialized value',
after => now() - 10,
);
DESCRIPTION
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.
This service keeps an in-memory buffer of every log entry sent to that topic in every broker in a logical message bus.
The command line tool bkpr-log
use this service to inspect logs in real time.
Please note that receiving all log traffic on a single process does not scale at all, so a better strategy will be needed for inspecting logs of big real world applications.
METHODS
tail ( %filters )
Returns all buffered entries that match the filter criteria.
The following parameters are accepted:
count
: Number of entries to return, default is last 10.
level
: Minimal severity level of entries to return.
host
: Regex that applies to worker host.
pool
: Regex that applies to worker pool.
service
: Regex that applies to service name.
message
: Regex that applies to error messages.
after
: Return only entries generated after given timestamp.
SEE ALSO
AUTHOR
José Micó, jose.mico@gmail.com
COPYRIGHT AND LICENSE
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.