add_logging
adds some logging messages to a function
Note
add_logging
supports async functions
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fn |
Callable
|
function to be decorated |
None
|
logger |
Logger
|
specific logger to use (otherwise root-logger) |
root
|
call |
bool
|
whether to log when the function is called |
True
|
call_args |
bool
|
whether to log the functions call arguments (only with |
True
|
timeit |
bool
|
whether to log the functions execution time |
True
|
timeit_precision |
int
|
precision of the logged execution time (only with |
2
|
result |
bool
|
whether to log the returned value of the function |
True
|