Auto generate logs for functions
Project description
python-autologs
Auto generate logs for functions based on function docstring
Decorator to generate log info and log error for function. The log contain the first line from the function docstring and resolve names from function docstring by function args, any args that not resolved from the docstring will be printed after. In some cases only info or error log is needed, the decorator can be called with @generate_logs(error=False) to get only log INFO and vice versa
Example: @generate_logs() def my_test(test, cases): ''' Run test with cases ''' return
my_test(test='my-test-name', cases=['case01', 'case02'] Will generate: INFO Run test my-test-name with cases case01, case02 ERROR Failed to Run test my-test-name with cases case01, case02 if step is True: Test Step 1: Run test my-test-name with cases case01, case02
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 python-autologs-0.0.5.tar.gz.
File metadata
- Download URL: python-autologs-0.0.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eeaf8214c0044c8d9f20e1c3856965e93155e1301c0a83dd1af773c686a4b02
|
|
| MD5 |
5fa8646180adb804d02f872ad39fe879
|
|
| BLAKE2b-256 |
b999557b0a7d8c8baca9664ce314176d87c35e665f5a7e961aa9d80603f02cf5
|
File details
Details for the file python_autologs-0.0.5-py3-none-any.whl.
File metadata
- Download URL: python_autologs-0.0.5-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
118277ea760e54030ac034f6fb456925d0be782b854e3ba94fbdc124e52a81a5
|
|
| MD5 |
e1d13b7b092f52636809b1113ed19581
|
|
| BLAKE2b-256 |
333605e531e8d5258676d9527eb9e7b31120acfa04aea4e04d6ab430a7c3f03c
|