Python Http logging handler for fluentd

JM Robles
4 min readSep 18, 2022

TL;DR: How to do modern python logging with a fluent logging collector

Bird and snake… interesting combination!

Motivation

Python's out-of-box logging facilities are excellent.

It’s a pluggable system that allows us to customize the logging format, add as many handlers as we need, configure it using config files and so on.

On the other hand, fluentd is a great open-source logging collector solution.

In the last post, we saw how to set up our own logging platform with fluent, Elasticsearch and Kibana.

This post, in a certain way, is an organic continuation of that.

On the one hand, we’ll see how simple is to do logging with Python to fluent. On the other, we’ll see different logging approaches under “modern Python logging” label.

Fluent HTTP library for Python

Until this very moment, under PyPI repository, we can only find a fluent library for the native transport format, not over HTTP.

--

--

JM Robles
JM Robles

Written by JM Robles

AIOps @ Montevive.ai / Backend / Platform engineer #llm #rag #llamaindex #langchain #go #python #kubernetes #terraform #devops

No responses yet