A small stdlib-only helper for configuring Python logging.
Call init_logger() once near the start of your process.
import logging
from cham_logging.bootstrap import init_logger
init_logger()
logger = logging.getLogger(__name__)
logger.info("service started")LOG_LEVEL controls the root logger and handler level.
LOG_LEVEL=DEBUG python -m your_appIf LOG_LEVEL is not set, INFO is used.
LOG_FILE enables an additional UTF-8 file handler.
LOG_FILE=app.log python -m your_appBoth variables can be used together.
LOG_LEVEL=DEBUG LOG_FILE=app.log python -m your_appLogs use UTC with microsecond precision:
2026-06-14T13:30:00.123456+00:00 - INFO - service started
The timezone is fixed to UTC for now and cannot be configured.