Decorators to indent-log function calls with parameter and timing
Project description
Decorators to log function calls with parameter and timing
Decorators to track down function call with indent. Both logging function and indent characters are configurable Decorate a function:
@log_call()
def method1(arg1, arg2):
return arg1 + arg2
method1(3, 4)
Output:
...CALL: method1(3, 4)
...'method1' RETURN: 7
...'method1' FINISHED in 0.000003 secs
Customize indent characters:
@log_call(indent='\_\_\_')
def method1(arg1, arg2):
return arg1 + arg2
method1(3, 4)
Output:
**_CALL: method1(3, 4)
_**'method1' RETURN: 7
\_\_\_'method1' FINISHED in 0.000006 sec
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
indented-logs-0.0.1.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file indented-logs-0.0.1.tar.gz
.
File metadata
- Download URL: indented-logs-0.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28a4abd92ed801bbdc889cdda8c8b788344ffa54b8508bd64ac892b6a7c8daea |
|
MD5 | a5d2b715ebfb1be9b1e75582c490d090 |
|
BLAKE2b-256 | 8e58789dedc98eb0a549957b29cad943deac2e94e0bb05ce56bfc1b8d25152e2 |
File details
Details for the file indented_logs-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: indented_logs-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51a5fc7c993c9fee129a35e8aaa6bb723474d645a42736c1408adc860b42009e |
|
MD5 | a6c35aac7b9e2afb69c659d7f6a8f45c |
|
BLAKE2b-256 | 82268752af637d13eeba217a445f6dea81f4806f71b8c319c6a3a3b608dd550b |