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 on a open stream. 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:

import amox

import package


amox.setup(name=package.__name__)  # `package` as application's 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.12.tar.gz (14.8 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.12-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amox-0.0.12.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","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.12.tar.gz
Algorithm Hash digest
SHA256 91d50c9e6d0d56de575864d4f14a47a99424f70c339a468c866fdcd61937bf06
MD5 06cfe511d1c3272f4aff65d013fb728c
BLAKE2b-256 17e463103f53c9988b7bffa7836413ce8bad0a0e923751bdc8fa71aef4b69871

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amox-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 4975c286ee911db51530749a5d75556ef9e2272ba6b36d0e0c39c0ac78fdd76c
MD5 62d0a9feb1a83aa236a54cb595712044
BLAKE2b-256 50918554a343655e2e58f5543398b50ab43f67d6232524440b175c79c5e91233

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