8000 GitHub - seanpm2001/Fluent_Fluent-Logger-Python: A structured logger for Fluentd (Python)
[go: up one dir, main page]

Skip to content

seanpm2001/Fluent_Fluent-Logger-Python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python structured logger for Fluentd/Fluent Bit

Many web/mobile applications generate huge amount of event logs (c,f. login, logout, purchase, follow, etc). To analyze these event logs could be really valuable for improving the service. However, the challenge is collecting these logs easily and reliably.

Fluentd and Fluent Bit solves that problem by having: easy installation, small footprint, plugins, reliable buffering, log forwarding, etc.

fluent-logger-python is a Python library, to record the events from Python application.

Requirements

  • Python 3.7+
  • msgpack
  • IMPORTANT: Version 0.8.0 is the last version supporting Python 2.6, 3.2 and 3.3
  • IMPORTANT: Version 0.9.6 is the last version supporting Python 2.7 and 3.4
  • IMPORTANT: Version 0.10.0 is the last version supporting Python 3.5 and 3.6

Installation

This library is distributed as 'fluent-logger' python package. Please execute the following command to install it.

$ pip install fluent-logger

Configuration

Fluentd daemon must be launched with a tcp source configuration:

<source>
  type forward
  port 24224
</source>

To quickly test your setup, add a matcher that logs to the stdout:

<match app.**>
  type stdout
</match>

Usage

FluentSender Interface