A small stdlib-only helper for configuring Python logging.
Project description
cham-logging
A small stdlib-only helper for configuring Python logging.
Usage
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")
Environment variables
LOG_LEVEL controls the root logger and handler level.
LOG_LEVEL=DEBUG python -m your_app
If LOG_LEVEL is not set, INFO is used.
LOG_FILE enables an additional UTF-8 file handler.
LOG_FILE=app.log python -m your_app
Both variables can be used together.
LOG_LEVEL=DEBUG LOG_FILE=app.log python -m your_app
Format
Logs 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.
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 cham_logging-0.1.2.tar.gz.
File metadata
- Download URL: cham_logging-0.1.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab472061cf83d5fcb1bdb1e64f49531a46942226d10b3a356effad79717579d6
|
|
| MD5 |
3fa138bc9d52a61d44f018e1258b7359
|
|
| BLAKE2b-256 |
858e33d43e12eaf3b368d6efd7c11b3118016e1cfbfaaebd4c2501c8cf86976b
|
Provenance
The following attestation bundles were made for cham_logging-0.1.2.tar.gz:
Publisher:
publish.yml on Chamkang6093/cham-logging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cham_logging-0.1.2.tar.gz -
Subject digest:
ab472061cf83d5fcb1bdb1e64f49531a46942226d10b3a356effad79717579d6 - Sigstore transparency entry: 1818239918
- Sigstore integration time:
-
Permalink:
Chamkang6093/cham-logging@2480e8fc0ad8617f75b0719d573cba996a63d10e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Chamkang6093
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2480e8fc0ad8617f75b0719d573cba996a63d10e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file cham_logging-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cham_logging-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9c5d59801c7e3820f95a42ae4c2aa4a9d75d61b1bed4ffca4e0cf116c39ce01
|
|
| MD5 |
c640f596b31a8d062bd2606d00d08fd5
|
|
| BLAKE2b-256 |
02e810a9481fb78873bc3bd64196e071400518fb76ba5bb58d0c6a7556e16844
|
Provenance
The following attestation bundles were made for cham_logging-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Chamkang6093/cham-logging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cham_logging-0.1.2-py3-none-any.whl -
Subject digest:
f9c5d59801c7e3820f95a42ae4c2aa4a9d75d61b1bed4ffca4e0cf116c39ce01 - Sigstore transparency entry: 1818239974
- Sigstore integration time:
-
Permalink:
Chamkang6093/cham-logging@2480e8fc0ad8617f75b0719d573cba996a63d10e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Chamkang6093
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2480e8fc0ad8617f75b0719d573cba996a63d10e -
Trigger Event:
workflow_dispatch
-
Statement type: