Tiny library to push logs to `Grafana Loki` in `logfmt` format.
Project description
smoloki
Tiny library to push logs to Grafana Loki
in logfmt
format.
import smoloki
async def as_request_completed():
await smoloki.push(
{'service': 'web'},
{'level': 'info', 'event': 'request_completed'},
)
def as_request_completed():
smoloki.push_sync(
{'service': 'web'},
{'level': 'info', 'event': 'request_completed'},
)
Configuration
SMOLOKI_BASE_ENDPOINT
– base address of Loki server.SMOLOKI_BASE_LABELS
- base labels that will be added to logs.SMOLOKI_BASE_INFORMATION
- base information that will be added to logs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
smoloki-0.0.3.tar.gz
(2.9 kB
view hashes)
Built Distributions
smoloki-0.0.3-py3.10.egg
(5.1 kB
view hashes)