【文件属性】:
文件名称:python-logging-loki:Loki的Python日志记录处理程序
文件大小:13KB
文件格式:ZIP
更新时间:2021-05-23 18:53:05
Python
python-logging-loki
Loki的Python日志记录处理程序。
安装
pip install python-logging-loki
用法
import logging
import logging_loki
handler = logging_loki . LokiHandler (
url = "https://my-loki-instance/loki/api/v1/push" ,
tags = { "application" : "my-app" },
auth = ( "username" , "password" ),
version = "1" ,
)
logger = logging . getLogger ( "my-logger" )
logger . addHandler ( handler )
logger
【文件预览】:
python-logging-loki-master
----setup.py(1KB)
----.gitignore(1KB)
----pyproject.toml(91B)
----.travis.yml(124B)
----logging_loki()
--------__init__.py(213B)
--------handlers.py(3KB)
--------emitter.py(5KB)
--------const.py(756B)
----LICENSE(1KB)
----setup.cfg(419B)
----README.md(2KB)
----tests()
--------__init__.py(0B)
--------test_emitter_v1.py(5KB)
--------test_emitter_v0.py(5KB)
----.editorconfig(104B)
----tox.ini(574B)