simple tool to facilitate logging - made for my personal use
Project description
log configurator
Simple configurator for the python logging package that allows simultaneous file and shell logging
installation
The log configurator can easily be installed from pypi
pip install log-configurator
usage
Import the package and the default python logging
import log_configurator
import logging
Configure python logging
log_configurator.setup_root_logger()
Create a logging instance in your module as usual and log with it
logger = logging.getLogger(__name__)
logger.info('Log Horizon')
buffer initial output
If you need more complex argument parsing before you can configure the logger you can buffer it and have it logged once you configure your logger.
initial_log = log_configurator.buffer_log()
logger = logging.getLogger(__name__)
logger.info('Early log information')
# <your setup code goes here>
log_configurator.setup_root_logger()
logger.debug(initial_log.getvalue())
The early log output currently can only be logged with one severity level.
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 log_configurator-0.0.3.tar.gz.
File metadata
- Download URL: log_configurator-0.0.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.10.12 Linux/5.15.167.4-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ce579f84dee43e686c1ad62288d7201a54855a4e21e2d663a613bb1110c47f
|
|
| MD5 |
3c159d95fd00060912ae7fd03d996e6b
|
|
| BLAKE2b-256 |
b7b0759d1d3856837eab46b5394f58b840f275c533fcaf3e498b8de9e53029bd
|
File details
Details for the file log_configurator-0.0.3-py3-none-any.whl.
File metadata
- Download URL: log_configurator-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.10.12 Linux/5.15.167.4-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4389ab40297d94cb25420ac75c14db0c8f53e8b1cba51aa526045ff124711fbb
|
|
| MD5 |
dc1e98671784fb970a3e54d75200bab7
|
|
| BLAKE2b-256 |
c072215b30dfb4ed7b74ddecac55aa9d01c11c283520d15e0d7925ba9bad2a04
|