Metadata-Version: 2.4
Name: larzlog
Version: 0.1.0
Summary: Structured logging - readable text or JSON logs, level-filtered, with context, zero dependencies
Author: larz-scripter
License: MIT
Project-URL: Homepage, https://github.com/larz-scripter/larzlog
Project-URL: Repository, https://github.com/larz-scripter/larzlog
Project-URL: Issues, https://github.com/larz-scripter/larzlog/issues
Keywords: logging,structured-logging,observability,production,learn-to-code,building-blocks,json,zero-dependency,pure-python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# larzlog

**Structured logging — readable, level-filtered logs (text or JSON) for real apps.**

When your app runs somewhere you can't see, logs are your eyes. larzlog is a small
structured logger: levels you can filter, `key=value` context fields, output as
human-readable text or machine-readable JSON, and `bind` to attach context (like a
request id) to every line. Everything is injectable (output, clock) so it's easy to
test. Zero dependencies.

## Install

```bash
pip install larzlog
```

## Use

```python
from larzlog import Logger

log = Logger("api", level="INFO")
log.info("user signed up", user_id=42, plan="pro")
# INFO api: user signed up user_id=42 plan=pro

req = log.bind(request_id="abc123")
req.warning("slow response", ms=812)
```

## Learn to code with Larz

Part of the **learn-to-code toolkit** in the [Larz stack](https://github.com/larz-scripter) —
see the [Learn to Code platform](https://larzos.com/learn/). A building block for
running apps in production.

## Tests

```bash
python -m unittest discover -s tests -v   # 5 tests
```

## License

MIT (c) larz-scripter
