log-indented helps you create human friendly logs.
Project description
log-indented
This is a package for producing indented, easy to understand logs.
Example:
Executing compute_the_answer()
from log_indented import logged, log_info
@logged
def compute_the_answer() -> int:
for i in range(10):
time.sleep(0.2)
log_info(f"{i}, computing the answer")
return 42
will produce output similar to this:
+ compute_the_answer: enter
compute_the_answer: 0, computing the answer
compute_the_answer: 1, computing the answer
...
compute_the_answer: 9, computing the answer
- compute_the_answer: exit. took 2,558.9 ms.
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
log-indented-0.2.0.tar.gz
(14.0 kB
view hashes)
Built Distribution
Close
Hashes for log_indented-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6759a58d483253306e1c14a1148ac2684d599ab6c16f453ffb37ecdb8d553a5 |
|
MD5 | 5b93e380832bc5d21cbf45b1a7d9de85 |
|
BLAKE2b-256 | 9f00ce9e6889910e5e03eb296c6adc7cbec6cce6c5a31c2c631bdc97d8eaf84c |