Skip to main content

Python logging configuration library for MLCommons AIRR applications.

Project description

Modellogger

The modellogger package provides a standardized logging configuration for AIRR applications.

Usage

Install in a poetry project: poetry add git+https://github.com/mlcommons/modellogger.git

DefaultFormatter

A class that formats log messages with UTC timestamps and optional ANSI color codes for console output.

get_logger

A function that creates configured loggers with console and optional file output.

from modellogger.log_config import get_logger

logger = get_logger(__name__, app_name="modelrunner-api")

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

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

airr_modellogger-0.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

airr_modellogger-0.1.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file airr_modellogger-0.1.1.tar.gz.

File metadata

  • Download URL: airr_modellogger-0.1.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.4 Darwin/25.2.0

File hashes

Hashes for airr_modellogger-0.1.1.tar.gz
Algorithm Hash digest
SHA256 91150a351a5ab01d953972a616d4066242dd6972bfd0769bc473071061ca0a86
MD5 d63ebc0c40d74dfa61c9d58e1b81326b
BLAKE2b-256 831b6272ab473d1b4213e75e14097b38639fcd6b5787d6db121cec8d683d2d52

See more details on using hashes here.

File details

Details for the file airr_modellogger-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: airr_modellogger-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.4 Darwin/25.2.0

File hashes

Hashes for airr_modellogger-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dede88a8a0868a51ed40c6ed4215872c3942d19fbff70c57b3e2a709b706c9e6
MD5 ae58615db1eebfcf982e20ae32a888d0
BLAKE2b-256 fed631708b9afe54cc8065131429fbb7c554b13cff8b61c7c5f0da21aaa6c448

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