Centralized logging utilities for InstruktAI Python services.
Project description
instruktai-python-logger
Centralized logging utilities for InstruktAI Python services.
This repo provides a shared, consistent logging contract (env vars + output format + log location) intended to keep logs highly queryable (including by AIs that only read a tail window).
Background and rationale live in docs/design.md.
Publishing notes live in docs/publishing.md.
Install (editable, local workspace)
From PyPI (recommended):
pip install instruktai-python-logger
From GitHub:
pip install git+ssh://git@github.com/InstruktAI/python-logger.git
API
- Python entrypoint:
instrukt_ai_logging.configure_logging(...) - Logger helper:
instrukt_ai_logging.get_logger(name)(named**kvlogging) - CLI entrypoint:
instrukt-ai-logs(reads recent log lines)
Example:
from instrukt_ai_logging import configure_logging, get_logger
configure_logging(name="teleclaude", app_logger_prefix="teleclaude")
logger = get_logger("teleclaude.core")
logger.info("job_started", job_id="abc123")
Environment variables (contract)
Per-app prefix model (example uses TELECLAUDE_):
TELECLAUDE_LOG_LEVELTELECLAUDE_THIRD_PARTY_LOG_LEVELTELECLAUDE_THIRD_PARTY_LOGGERS(comma-separated logger prefixes, e.g.httpcore,telegram)
Global:
INSTRUKT_AI_LOG_ROOT(optional log root override)
Log location (contract)
Default target:
/var/log/instrukt-ai/{app}/{app}.log
The installer for each service is expected to create the directory and set write permissions for the daemon user. If the default location is not writable, the implementation will fall back to a user-writable directory and/or require INSTRUKT_AI_LOG_ROOT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file instruktai_python_logger-0.1.1.tar.gz.
File metadata
- Download URL: instruktai_python_logger-0.1.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0e8a45fd160e31cb3e240d0369269d2113abe455907e189f02453ea23153c0d
|
|
| MD5 |
60c9bc753c3bef442146d0e859027005
|
|
| BLAKE2b-256 |
37237d5f0e53fb8b255e8a2a28f39387755aabd3e21c1474ab9aa7e8a26fb9cb
|
File details
Details for the file instruktai_python_logger-0.1.1-py3-none-any.whl.
File metadata
- Download URL: instruktai_python_logger-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc1bcaf1c17788e4cf6a83ce91aee8c2f6f400badd2151eee513a0beef54048e
|
|
| MD5 |
75ae99be2c990032074a233a5ee74fdd
|
|
| BLAKE2b-256 |
7ded174f80419cf7ec051692675caaaa45354a8d26ea8908d13c094e299450c6
|