Skip to main content

Tiny library to push logs to `Grafana Loki` in `logfmt` format.

Project description

smoloki

PyPI version

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


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 details)

Uploaded Source

Built Distributions

smoloki-0.0.3-py3.10.egg (5.1 kB view details)

Uploaded Source

smoloki-0.0.3-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file smoloki-0.0.3.tar.gz.

File metadata

  • Download URL: smoloki-0.0.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for smoloki-0.0.3.tar.gz
Algorithm Hash digest
SHA256 abbac524c49b845df8d00df962edafd10e48be60536927074b1d58402b8eaa30
MD5 54dd1413732350a5a9ff17d9da787bdd
BLAKE2b-256 0bf4d9a4b90ce112a1c84caf2cea1cee7b642a0385d655e819720240a730dffc

See more details on using hashes here.

File details

Details for the file smoloki-0.0.3-py3.10.egg.

File metadata

  • Download URL: smoloki-0.0.3-py3.10.egg
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for smoloki-0.0.3-py3.10.egg
Algorithm Hash digest
SHA256 88fb10fdd5e91036ed30f05bdcc16ef9084445ad7fc9e39d8a5e861e272c2c38
MD5 dff102f34f257d7229e853b016b8fa2f
BLAKE2b-256 fbe30e9b6f360a549251565ddea6f6475719e5f3d6fb6619b7f3bdb7fa3b7d72

See more details on using hashes here.

File details

Details for the file smoloki-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: smoloki-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for smoloki-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 767f3db4ea90bcde01694730342df10b6978df1eb2b9ade3439f2ada2cf9016a
MD5 5cffa03c719ffa21f129d1b5f6830cba
BLAKE2b-256 05bbe783ae9f50d7d647cb5d7577e2efda1a012f13b282ffff497267d77c0a00

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page