airrlogger
The airrlogger package provides a standardized logging configuration for AIRR applications.
Usage
Install in a poetry project: poetry add airrlogger
Near the top of any module where you want to log, do something like:
from airrlogger.log_config import get_logger
logger = get_logger(__name__)
Then as early as possible in your program's startup, tell it how to handle the logging:
import logging
from airrlogger.log_config import configure_logging
configure_logging(app_name="myapp", level=logging.INFO)
You can then log like this:
logger.info("some info logging")
The default output looks like this:
2026-01-09T21:14:13Z - myapp - __main__ - INFO - some info logging
DefaultFormatter
A class that formats log messages with UTC timestamps and optional ANSI color codes for console output.
DebuggingFormatter
A class that formats log messages mostly like DefaultFormatter, adding the fully-qualified scope and lined number
where the logging event happens.
To use it:
import logging
from log_config import DebuggingFormatter, configure_logging, get_logger
logger = get_logger("my app")
configure_logging("test_module", logging.DEBUG, formatter=DebuggingFormatter)
The output looks like this:
2026-03-24T20:43:13Z - test_module - my app - ERROR - test:8 - calling from top-level scope before everything else
2026-03-24T20:43:13Z - test_module - my app - ERROR - test:25 - calling from main block in top-level scope
2026-03-24T20:43:13Z - test_module - my app - ERROR - test.MyClass.my_method:13 - calling from my_method
2026-03-24T20:43:13Z - test_module - my app - ERROR - test.MyClass.my_static_method:17 - calling from my_static_method
This formatter is independent of the log level. You can use it even if your log level is not logging.DEBUG.
There is some performance overhead with this method you should keep in mind in a production environment.
configure_logging
A function that configure the root logger with console and optional file output. You can call it multiple times with different loggers or formatters and they will be added to the root logger's log handlers.
from airrlogger.log_config import configure_logging
logger = configure_logging(app_name="modelrunner-api", file="./app.log", level=logging.DEBUG)
get_config_dict
Generates logging configuration dictionaries for use with logging.config.dictConfig. By default, the app name
is derived from the package name, but that can be overridden.
This is particularly useful for FastAPI applications, which can adopt this logger by using something like:
run(app, host="0.0.0.0", port=port, log_config=get_config_dict(app_name="modelrunner-api"))
Example Output
2025-12-19T14:10:24Z - modelrunner-api - INFO - 127.0.0.1:36054 - "GET /health HTTP/1.1" 200
Metadata
Release files for airrlogger 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| airrlogger-0.1.1.tar.gz | 7.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| airrlogger-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.1 kB
Release files / airrlogger-0.1.1.tar.gz
| Download URL | airrlogger-0.1.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e81dd3a48632f845e28c9446c28139c58958917eb1ba944f17e5550b1ff9bd5a
|
|
BLAKE2b-256 checksum How to use checksums |
3ad965f155db9e009661451f95a4a8bcb879d61033265df2b6a34ec9c2ce94b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.13.4 Darwin/25.3.0
|
Release files / airrlogger-0.1.1-py3-none-any.whl
| Download URL | airrlogger-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b7bead65687f096f5d4c8f9187bc43d87c265c0e7dd4baaa089a83675f81602
|
|
BLAKE2b-256 checksum How to use checksums |
3ea520eab342ac77bf8deaeb54936744bd17b584c7f4d4d0020f8f1ddc921392
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.13.4 Darwin/25.3.0
|
Security for airrlogger 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.