Skip to main content

Schema on read based logging

Project description

amox

Amox (from the Nahuatl amoxtli: book, codex, written record) is a zero-dependency Python logging library to produce records on schema-on-read formats.

Adheres to standard log serialization formats, including logfmt and json, with a single configuration line to rule a system.

Mental model

A service runs programmatically, emitting records for domain-specific events. Producing messages in a human-readable format for real-time inspection is necessary, yet these have to be processable subsequently.

Produce logs semi-structured. Let third parties do the parsing, processing or any downstream action.

Usage

Initialize once

Single call, every log record will obey the configured format.

On application's entrypoint:

from amox import setup

setup(__name__)

Standard logging.getLogger() works transparently: all records are emitted on the configured format.

import logging

logger = logging.getLogger(__name__)

[!NOTE] amox provides an analog to logging's getLogger with amox.get_logger. However, usage of this function is not mandatory, it can be used interchangeably as preferred.

Line by line

Configuration is individually possible at the logger level, yet format consistency across all log emissions cannot be guaranteed by amox.

As follows

import amox

logger = amox.get_logger(__name__)

License

MIT

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

amox-0.0.8.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amox-0.0.8-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file amox-0.0.8.tar.gz.

File metadata

  • Download URL: amox-0.0.8.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for amox-0.0.8.tar.gz
Algorithm Hash digest
SHA256 d23dd0a86a9af27292cd7ec790101a49e9299739e62d665aa8826a003143d329
MD5 83f7ad3d0f601f3c74a8be21ef99532c
BLAKE2b-256 680744f6be4313488614ae05afe6c8a2cadfe63f70dd4397ce17760bd03bc1a6

See more details on using hashes here.

File details

Details for the file amox-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: amox-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for amox-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2e2359509d43955af504f461c2125cc9e73a571c0ff8e36ba5763f65c2248a2f
MD5 87daf94d53937ab75ea4bbdff903efe3
BLAKE2b-256 1b22a709ecfc953a7d8a5f383aa6eeac7694cc90a1b9c58682781a9de7298382

See more details on using hashes here.

Supported by

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