This is a Python package that provides decorators for logging function execution and timing function execution.
Project description
Function Logger and Timer
This is a Python package that provides decorators for logging function execution and timing function execution.
Installation
You can install the package using pip: 'pip install log_exc_decorator'
Usage
Logging function execution
To log function execution, use the elog decorator. Here's an example:
from log_exc_decorator import elog
@elog
def my_function():
# your code here
pass
This will log the start and end of my_function, as well as any exceptions that may occur.
Timing function execution
To time function execution, use the timeit decorator. Here's an example:
from log_exc_decorator import timeit
@timeit
def my_function():
# your code here
pass
This will time how long it takes to execute my_function and log the elapsed time.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Apache
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
Hashes for elog_thiago1080-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22b26f07937c42f3e8319a73ee3161256596244cca4a8a8c927ff34cde58b179 |
|
MD5 | 2d15f209d56ae73a1111584afed80fdb |
|
BLAKE2b-256 | 572331410574bf023c8e425f9c031ee9c50c1667845f7069921ab4c8c18ef4cb |