A util for logging the time elapsed for a task.
Project description
colortimelog: A util for logging the time elapsed for a task.
Install
pip install colortimelog
Usage
Add timing for a function:
import colortimelog
@colortimelog.timefunc
def my_function():
...
Add timeing for a block of code:
import colortimelog
with colortimelog.timeblock("Doing XYC"):
do_x()
do_y()
do_z()
Logging with verbosity control:
import colortimelog
logger = colortimelog.Logger(verbosity=3)
logger.error("This is an error")
logger.info("This is info")
logger.fatal("This will fail")
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
colortimelog-0.0.5.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for colortimelog-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b162a052b2ed5ef7d8bc8099d684292a98fb2a7df0e211ce689074a683d606d0 |
|
MD5 | 1922938dd513b50384462028aa394b0d |
|
BLAKE2b-256 | 6db588ad69680109111a7f4f0fc5c929f151bfd0b160b9310aa0f9fa3ff1b8f1 |