logging by environment
Project description
autowrapt-logger
A Python module logging to stdout the elapsed time of module:method specified as an env, without the need to actually modify the Python application itself to setup the monkey patches.
Installation
pip install autowrapt-logger
Usage
The autowrapt-logger can then be activated without any code changes required by setting the following environment variable for your Python application:
AUTOWRAPT_BOOTSTRAP=autowrapt_logger INSTRUMENT_LIST="worker:logic_a,worker:logic_b,worker:get_db_data,worker:job" python3 example.py
This will cause the autowrapt-logger Python package to automatically instrument (like module:method) your Python application. it will print elapsed time for instrumented method.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file autowrapt_logger-1.5-py3-none-any.whl
.
File metadata
- Download URL: autowrapt_logger-1.5-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3db410e548e02be5baccfa4dc4291e78259b5cb01029ea272f1647666f15ef97 |
|
MD5 | e6e99edd5d4e3ce3af36527558a1385c |
|
BLAKE2b-256 | fe4a8d3a2331b87e0eb07747db0f408d589a14015362acb5e9d544a1ffd5811b |