Hey! These docs are for version 5.1, which is no longer officially supported. Click here for the latest version, 2022.1!

Using Python

Python applications can log to Seq through the Python logging API with seqlog (recommended), with pygelf and GELF, or via direct HTTP and JSON.


The seqlog package implements a Python logging adapter for Seq:

# Indexer-style"Hello, %s!", "World")

# Message template style"Hello, {name}!", name="World")

The detailed project documentation includes full configuration and usage examples.

The project is independently developed on GitHub.

pygelf with GELF via UDP

pygelf is a GELF logging handler for Python.

1. Enable the Seq GELF input

See the instructions in Using GELF.

2. Install pygelf

$ pip install pygelf

3. Configure the GelfUdpHandler

from pygelf import GelfUdpHandler
import logging

logger = logging.getLogger()
logger.addHandler(GelfUdpHandler(host='', port=12201))

4. Log some events!'Hello, Seq+GELF!')


Python applications can alternatively use the HTTP API to post events as raw JSON documents.

Did this page help you?