Skip to main content

log-indented helps you create human friendly logs.

Project description

log-indented

Python application

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


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)

Uploaded Source

Built Distribution

log_indented-0.2.0-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page