Skip to main content

A util for logging the time elapsed for a task.

Project description

colortimelog: A util for logging the time elapsed for a task

Python package PyPI Version Python Versions Downloads

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


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.9.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

colortimelog-0.0.9-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file colortimelog-0.0.9.tar.gz.

File metadata

  • Download URL: colortimelog-0.0.9.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.1

File hashes

Hashes for colortimelog-0.0.9.tar.gz
Algorithm Hash digest
SHA256 d54cbe201992b1b501a84db39a692498e6704d0afd4c294aa1fd4170069d160b
MD5 307ed780bc408dc955854f8084e70b76
BLAKE2b-256 6cba37dcad0f028155ea1118fd113412433121ec6c709be97f7fdddb584c806d

See more details on using hashes here.

File details

Details for the file colortimelog-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for colortimelog-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0c8462a4853108fdaeab2f89f968af2b53eef8e1af95d464452b6bfaf56eaa53
MD5 6d1d887bc356c9c531107f84801fd741
BLAKE2b-256 d8d119838ff15892f01bcaf58d3d69856686265f85532aeb1c5df1a6fdbb349a

See more details on using hashes here.

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