Formatters for the Python logging module. gouge gives console output a
uniform, coloured layout that is easy to scan, and writes the same records
as JSON Lines, CSV or XML for machines. It works with the standard library
alone: no wrapper API, no new logger class.
Documentation: https://exhuma.github.io/gouge/
gouge needs Python 3.11 or newer:
pip install gouge
>>> import logging
>>> from gouge.colourcli import Simple
>>> handlers = Simple.basicConfig(
... level=logging.INFO
... )
>>> log = logging.getLogger("app")
>>> log.info("Server started")
2026-10-27 13:34:48,899 INFO [app] Server started
>>> log.warning("Disk 91% full")
2026-10-27 13:34:48,899 WARNING [app] Disk 91% full
On a terminal, the time, level and logger name are coloured.
The documentation covers console output, configuration files, extra attributes and correlation IDs, JSON output, uvicorn and colour control. The changelog lists the changes in every release.
gouge is actively maintained and stable (Production/Stable). It follows Semantic Versioning; the compatibility policy defines what counts as a breaking change and how deprecation works.
