Creates a reasonable logging configuration for a Python project
Project description
readylog
Readylog is a logging configuration template for Python's logging.
Usage
Basic example:
# my_app.py
from logging.config import dictConfig as configure_logging
from logging import getLogger
from pathlib import Path
from platformdirs import user_log_dir
from readylog import create_dict_config
def setup_logging() -> None:
app_name = "my_app"
author = "Me"
log_dir = Path(user_log_dir(app_name, author))
log_dir.mkdir(parents=True, exist_ok=True)
logging_config = create_dict_config(log_dir / "debug.log", app_name)
configure_logging(logging_config)
logger = getLogger(__name__)
setup_logging()
logger.debug("This should be logged")
Documentation
from readylog import create_dict_confg
print create_dict_config.__doc__
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
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 readylog-0.5.0.tar.gz.
File metadata
- Download URL: readylog-0.5.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3e754eddb4f050f948f4869c5f2d1a28a593c92dfa8641367d5d7074e564cdd
|
|
| MD5 |
3381e6a7c46f3b91954846dfc298153a
|
|
| BLAKE2b-256 |
c7a173c6d509badd8be3ce4694d80253b84a51fc6f28e3021b024d6d088df6c3
|
Provenance
The following attestation bundles were made for readylog-0.5.0.tar.gz:
Publisher:
continuous-delivery.yml on fleetingbytes/readylog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
readylog-0.5.0.tar.gz -
Subject digest:
f3e754eddb4f050f948f4869c5f2d1a28a593c92dfa8641367d5d7074e564cdd - Sigstore transparency entry: 920076760
- Sigstore integration time:
-
Permalink:
fleetingbytes/readylog@174eb8455151f4cf375b6dc5bad6856676868996 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/fleetingbytes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
continuous-delivery.yml@174eb8455151f4cf375b6dc5bad6856676868996 -
Trigger Event:
push
-
Statement type:
File details
Details for the file readylog-0.5.0-py3-none-any.whl.
File metadata
- Download URL: readylog-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c58b910da307a7d80f207415bfa45a0377aa3dcf3510ead8b6ca974227aba48
|
|
| MD5 |
abd765ca0a769abbb3e9dfbe5999b2f5
|
|
| BLAKE2b-256 |
185228de0710209230d5b5d4c2e36a3402b9a16046eb4cb6079de2efcd40280e
|
Provenance
The following attestation bundles were made for readylog-0.5.0-py3-none-any.whl:
Publisher:
continuous-delivery.yml on fleetingbytes/readylog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
readylog-0.5.0-py3-none-any.whl -
Subject digest:
7c58b910da307a7d80f207415bfa45a0377aa3dcf3510ead8b6ca974227aba48 - Sigstore transparency entry: 920076763
- Sigstore integration time:
-
Permalink:
fleetingbytes/readylog@174eb8455151f4cf375b6dc5bad6856676868996 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/fleetingbytes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
continuous-delivery.yml@174eb8455151f4cf375b6dc5bad6856676868996 -
Trigger Event:
push
-
Statement type: