All Projects → fluent → Fluent Logger Perl

fluent / Fluent Logger Perl

Licence: other
A structured logger for Fluentd (Perl)

Programming Languages

perl
6916 projects

Labels

Projects that are alternatives of or similar to Fluent Logger Perl

rack-fluentd-logger
Rack middleware to send traffic logs to Fluentd
Stars: ✭ 21 (-48.78%)
Mutual labels:  fluentd
Fluent Logger Python
A structured logger for Fluentd (Python)
Stars: ✭ 364 (+787.8%)
Mutual labels:  fluentd
Fluentd
Log shipping mechanism for Deis Workflow
Stars: ✭ 10 (-75.61%)
Mutual labels:  fluentd
Fluent Plugin Kafka
Kafka input and output plugin for Fluentd
Stars: ✭ 268 (+553.66%)
Mutual labels:  fluentd
Elk Kubernetes
This repo shows how to configure complete EFK stack on top of Kubernetes
Stars: ✭ 294 (+617.07%)
Mutual labels:  fluentd
Fluentd Ui
Web UI for Fluentd
Stars: ✭ 546 (+1231.71%)
Mutual labels:  fluentd
fluent-plugin-multiprocess
Multiprocess agent plugin for Fluentd
Stars: ✭ 42 (+2.44%)
Mutual labels:  fluentd
Vector Test Harness
End-to-end test harness for the Vector observability data router
Stars: ✭ 32 (-21.95%)
Mutual labels:  fluentd
Fluent Logger Golang
A structured logger for Fluentd (Golang)
Stars: ✭ 294 (+617.07%)
Mutual labels:  fluentd
Fluentd Sidecar Injector
Webhook server for kubernetes admission webhook to inject fluentd as sidecar
Stars: ✭ 22 (-46.34%)
Mutual labels:  fluentd
Aws Fluent Plugin Kinesis
Fluent Plugin for Amazon Kinesis
Stars: ✭ 272 (+563.41%)
Mutual labels:  fluentd
Ansible Elk
📊 Ansible playbook for setting up an ELK/EFK stack and clients.
Stars: ✭ 284 (+592.68%)
Mutual labels:  fluentd
Presentations
📊Presentations from the CNCF community to share and reuse
Stars: ✭ 566 (+1280.49%)
Mutual labels:  fluentd
K8s
Important production-grade Kubernetes Ops Services
Stars: ✭ 253 (+517.07%)
Mutual labels:  fluentd
Led
LED ( Logs Explorer for Docker ) is a tool used for visualizing and exploring docker container logs
Stars: ✭ 13 (-68.29%)
Mutual labels:  fluentd
fluent-plugin-cloudwatch-ingest
Alternative to ryotarai/fluent-plugin-cloudwatch-logs for ingesting AWS Cloudwatch logs via fluentd
Stars: ✭ 11 (-73.17%)
Mutual labels:  fluentd
Fluentd Docker Image
Docker image for Fluentd
Stars: ✭ 383 (+834.15%)
Mutual labels:  fluentd
Fluent Bit Go Loki
[Deprecated] The predessor of fluent-bit output plugin for Loki. https://github.com/grafana/loki
Stars: ✭ 38 (-7.32%)
Mutual labels:  fluentd
Influent
A Fluentd server running on the JVM
Stars: ✭ 27 (-34.15%)
Mutual labels:  fluentd
Loghouse
Ready to use log management solution for Kubernetes storing data in ClickHouse and providing web UI.
Stars: ✭ 805 (+1863.41%)
Mutual labels:  fluentd

Build Status

NAME

Fluent::Logger - A structured event logger for Fluent

SYNOPSIS

use Fluent::Logger;

my $logger = Fluent::Logger->new(
    host => '127.0.0.1',
    port => 24224,
);
$logger->post("myapp.access", { "agent" => "foo" });
# output: myapp.access {"agent":"foo"}

my $logger = Fluent::Logger->new(
    tag_prefix => 'myapp',
    host       => '127.0.0.1',
    port       => 24224,
);
$logger->post("access", { "agent" => "foo" });
# output: myapp.access {"agent":"foo"}

DESCRIPTION

Fluent::Logger is a structured event logger for Fluentd.

METHODS

  • new(%args)

    create new logger instance.

    %args:

      tag_prefix                  => 'Str':  optional
      host                        => 'Str':  default is '127.0.0.1'
      port                        => 'Int':  default is 24224
      timeout                     => 'Num':  default is 3.0
      socket                      => 'Str':  default undef (e.g. "/var/run/fluent/fluent.sock")
      prefer_integer              => 'Bool': default 1 (set to Data::MessagePack->prefer_integer)
      event_time                  => 'Bool': default 0 (timestamp includes nanoseconds, supported by fluentd >= 0.14.0)
      buffer_limit                => 'Int':  defualt 8388608 (8MB)
      buffer_overflow_handler     => 'Code': optional
      truncate_buffer_at_overflow => 'Bool': default 0
      ack                         => 'Bool': default 0 (not works on MSWin32)
      retry_immediately           => 'Int':  default 0 (retries immediately  N times on error occured)
    
    • buffer_overflow_handler

      You can inject your own custom coderef to handle buffer overflow in the event of connection failure. This will mitigate the loss of data instead of simply throwing data away.

      Your proc should accept a single argument, which will be the internal buffer of messages from the logger. This coderef is also called when logger.close() failed to flush the remaining internal buffer of messages. A typical use-case for this would be writing to disk or possibly writing to Redis.

    • truncate_buffer_at_overflow

      When truncate_buffer_at_overflow is true and pending buffer size is larger than buffer_limit, post() returns undef.

      Pending buffer still be kept, but last message passed to post() is not sent and not appended to buffer. You may handle the message by other method.

    • ack

      post() waits ack response from server for each messages.

      An exception will raise if ack is miss match or timed out.

      This option does not work on MSWin32 platform currently, because Data::MessagePack::Stream does not work.

    • retry_immediately

      By default, Fluent::Logger will retry to send the buffer at next post() called when an error occured in post().

      If retry_immediately(N) is set, retries immediately max N times.

  • post($tag:Str, $msg:HashRef)

    Send message to fluent server with tag.

    Return bytes length of written messages.

    If event_time is set to true, log's timestamp includes nanoseconds.

  • post_with_time($tag:Str, $msg:HashRef, $time:Int|Float)

    Send message to fluent server with tag and time.

    If event_time is set to true, $time argument accepts Float value (such as Time::HiRes::time()).

  • close()

    close connection.

    If the logger has pending data, flushing it to server on close.

  • errstr

    return error message.

      $logger->post( info => { "msg": "test" } )
          or die $logger->errstr;
    

AUTHOR

HIROSE Masaaki <hirose31 _at_ gmail.com>

Shinichiro Sei <sei _at_ kayac.com>

FUJIWARA Shunichiro <fujiwara _at_ cpan.org>

THANKS TO

Kazuki Ohta

FURUHASHI Sadayuki

lestrrat

REPOSITORY

https://github.com/fluent/fluent-logger-perl

git clone git://github.com/fluent/fluent-logger-perl.git

patches and collaborators are welcome.

SEE ALSO

http://fluent.github.com/

COPYRIGHT & LICENSE

Copyright FUJIWARA Shunichiro

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].