Metadata-Version: 2.4
Name: amox
Version: 0.0.9
Summary: Schema on read based logging
Keywords: json,logfmt,logging,structured-logging
Author: Kevin Montoya
Author-email: Kevin Montoya <me@kmontocam.com>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Logging
Classifier: Typing :: Typed
Requires-Python: >=3.12
Project-URL: Issues, https://github.com/kmontocam/amox/issues
Project-URL: Repository, https://github.com/kmontocam/amox
Description-Content-Type: text/markdown

# 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:

```src/main.py
from amox import setup

setup(name=__name__)
```

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

```src/module/__init__.py
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

```py
import amox

logger = amox.get_logger(__name__)
```

## License

[MIT](LICENSE)
