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
This library uses LOKI_BASE_ENDPOINT
environment variable to acquire
base address for requests.
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.1a1.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for smoloki-0.0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e46f37fde0472e45ba614e8a12a65181d1cc40a277cc4a2a6d7468f1e1ff2b9 |
|
MD5 | 87c208f911ee6931578fe2e3a142820a |
|
BLAKE2b-256 | 97528cf121aa94521ef47c4fd449d64b149ec0a1df403916ef98cf9eccd2fd27 |