Watches your logging configuration file for change and applies them without requiring an application restart
Project description
Log Config Watcher
This library makes it easy to load a JSON formatted Python Logging configuration file and monitor the file for changes. If the configuration has changed, and is valid, it will automatically be applied and the changes will be reflect in your logging without restarting.
Getting Started
from log_config_watcher import LogConfigWatcher
log_watcher = LogConfigWatcher("config.json")
log_Watcher.start()
Options
The LogConfigWatcher class using the Python logging system to setup a basicConfig before
attempting to load the config file. This way if there are any errors during the loading of the file
they will be reported somewhere. You can customize the defaults using the following settings passed
to the constructor.
- default_level: int - A Python logging logging level, such as, DEBUG, INFO, WARNING, or ERROR
- default_format: str - A Python logging format string
- default_handler: logging.Handler - A Python logging Handler type, such as, StreamHandler, FileHandler, etc, etc
- logger_name: str - defaults to
LogWatcherwhen callinggetLogger. Setting this allows you to use a custom logger
Development
This project uses Poetry as its project manager. The goal of this library is to have no external runtime dependencies. However, for development, the following are used:
- pytest - For running tests
- pre-commit - Pre-commit hooks to check formatting and lots of other things
- PR will automatically run these check and fail if they don't pass
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_config_watcher-0.3.1.tar.gz.
File metadata
- Download URL: log_config_watcher-0.3.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ff15f89533063c330bd5dfd1534a2d8f590f439ea7609bf0da5c9542ddc70d7
|
|
| MD5 |
ea11691e280b5c1aef9af486fe6fc946
|
|
| BLAKE2b-256 |
3d1364afe52807288d9f78bae80a9b1d76f9defbb42bb7f096bf6df0397f8e35
|
Provenance
The following attestation bundles were made for log_config_watcher-0.3.1.tar.gz:
Publisher:
publish.yml on RobertDeRose/log_config_watcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
log_config_watcher-0.3.1.tar.gz -
Subject digest:
1ff15f89533063c330bd5dfd1534a2d8f590f439ea7609bf0da5c9542ddc70d7 - Sigstore transparency entry: 199398741
- Sigstore integration time:
-
Permalink:
RobertDeRose/log_config_watcher@589b898a0441a4eb6ffc0e1dec0790e3b168982b -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/RobertDeRose
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@589b898a0441a4eb6ffc0e1dec0790e3b168982b -
Trigger Event:
push
-
Statement type:
File details
Details for the file log_config_watcher-0.3.1-py3-none-any.whl.
File metadata
- Download URL: log_config_watcher-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b82a491ce49aa5518aba736a8d5dd145a21b37f31d5d680a25dcfabf0655ec5c
|
|
| MD5 |
23b98f00e8ae3fa6f3e79222634d9cdf
|
|
| BLAKE2b-256 |
1eb363012873e73d618522502f925e74819549e4894882146e24618137fc3f97
|
Provenance
The following attestation bundles were made for log_config_watcher-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on RobertDeRose/log_config_watcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
log_config_watcher-0.3.1-py3-none-any.whl -
Subject digest:
b82a491ce49aa5518aba736a8d5dd145a21b37f31d5d680a25dcfabf0655ec5c - Sigstore transparency entry: 199398745
- Sigstore integration time:
-
Permalink:
RobertDeRose/log_config_watcher@589b898a0441a4eb6ffc0e1dec0790e3b168982b -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/RobertDeRose
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@589b898a0441a4eb6ffc0e1dec0790e3b168982b -
Trigger Event:
push
-
Statement type: