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.4-py3-none-any.whl
.
File metadata
- Download URL: autowrapt_logger-1.4-py3-none-any.whl
- Upload date:
- Size: 2.7 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 | f9c3c9c63ec8e19a31fbd3f004a13a48cae99aac85c63f19c587f8b93406f977 |
|
MD5 | 519dd4eb4f515c4f0d5baa73fb8b3c7d |
|
BLAKE2b-256 | 98db236e7720ea66ba708f7a6da4dd068a8154358c5c7e9667100a3b1255bd2b |