尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗.. image:: https://github.com/exhuma/gouge/actions/workflows/pythonpackage.yml/badge.svg :target: https://github.com/exhuma/gouge/actions/workflows/pythonpackage.yml :alt: CI status
.. image:: https://img.shields.io/pypi/v/gouge.svg :target: https://pypi.org/project/gouge/ :alt: PyPI version
.. image:: https://img.shields.io/pypi/pyversions/gouge.svg :target: https://pypi.org/project/gouge/ :alt: Supported Python versions
.. image:: https://github.com/exhuma/gouge/actions/workflows/docs.yml/badge.svg :target: https://exhuma.github.io/gouge/ :alt: Documentation
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/
.. image:: https://raw.githubusercontent.com/exhuma/gouge/master/docs/_static/snapshot1.png :alt: Console output of gouge: coloured level names, logger names in bold, and a red traceback.
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 <https://exhuma.github.io/gouge/getting-started.html>, configuration files <https://exhuma.github.io/gouge/configuring.html>, extra attributes and correlation IDs <https://exhuma.github.io/gouge/extra-attributes.html>, JSON output <https://exhuma.github.io/gouge/structured-output.html>, uvicorn <https://exhuma.github.io/gouge/uvicorn.html>_ and colour control <https://exhuma.github.io/gouge/colour.html>. The changelog <https://exhuma.github.io/gouge/changelog.html> lists the changes in
every release.
gouge is actively maintained and stable (Production/Stable). It follows
Semantic Versioning; the compatibility policy <https://exhuma.github.io/gouge/#compatibility>_ defines what counts as a
breaking change and how deprecation works.