NAME
Fluent::LibFluentBit::Logger - Perl-style logger object that logs to the 'lib' input of fluent-bit
VERSION
version 0.03
SYNOPSIS
my $logger= Fluent::LibFluentBit->new_logger;
$logger->trace(...);
$logger->debug(...);
$logger->info(...);
$logger->warn(...);
$logger->notice(...);
$logger->error(...);
DESCRIPTION
The fluent-bit library allows an input of type "lib" which is written directly from code in the same process. (this is the primary point of the library)
This logger object writes to that input, using a key of "message"
for the text of the log message, and a key of "status"
for the log-level.
ATTRIBUTES
context
An instance of Fluent::LibFluentBit. Read-only. Required.
input_id
The ID of the 'lib' input for libfluent-bit, which these messages are written into. Read-only. Required.
include_caller
Boolean. If set to true, this will inspect the caller on each log message and include that in the logged data as keys 'file'
, 'line'
, and 'caller'
(package or function name where the call was made).
METHODS
Log Delivery Methods
$logger->info("message");
$logger->info(message => "message");
$logger->info({ message => "message" });
Each method allows a single scalar, or hashref, or list of key/value pairs. A single scalar becomes the value for the key 'message'. They all return $self.
- trace
- debug
- info
- warn
- notice
- error
AUTHOR
Michael Conrad <mconrad@intellitree.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2023 by Michael Conrad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.