Skip to main content

tasklogger

Project description

Latest PyPi version Latest Conda version Travis CI Build Coverage Status Twitter GitHub stars

An extension to the core python logging library for logging the beginning and completion of tasks and subtasks.

Installation

tasklogger is available on pip. Install by running the following in a terminal:

pip install --user tasklogger

Alternatively, tasklogger can be installed using Conda (most easily obtained via the Miniconda Python distribution):

conda install -c conda-forge tasklogger

Usage example

Use tasklogger for all your logging needs - receive timed updates mid-computation using tasklogger.log_start and tasklogger.log_complete:

>>> import tasklogger
>>> import time
>>> tasklogger.log_start("Supertask")
Calculating Supertask...
>>> time.sleep(1)
>>> tasklogger.log_start("Subtask")
Calculating Subtask...
>>> time.sleep(1)
>>> tasklogger.log_complete("Subtask")
Calculated Subtask in 1.01 seconds.
>>> time.sleep(1)
>>> tasklogger.log_complete("Supertask")
Calculated Supertask in 3.02 seconds.
>>> tasklogger.log_info("Log some stuff that doesn't need timing")
Log some stuff that doesn't need timing
>>> tasklogger.log_debug("Log some stuff that normally isn't needed")
>>> tasklogger.set_level(2)
Set TaskLogger logging to DEBUG
>>> tasklogger.log_debug("Log some stuff that normally isn't needed")
Log some stuff that normally isn't needed

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

tasklogger-0.4.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

tasklogger-0.4.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file tasklogger-0.4.0.tar.gz.

File metadata

  • Download URL: tasklogger-0.4.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for tasklogger-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8da2b204cee2ecd0e6e8e2bf1d6a762e83cbb63b5c399c635f75b8aadd8818dd
MD5 4514fd945a877a7e7a9e81fcf7cdc641
BLAKE2b-256 14d57ea6e0e8cacb54fc6ed18454ac269b115d2e35ec6c735b6181a9083ebe00

See more details on using hashes here.

File details

Details for the file tasklogger-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: tasklogger-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for tasklogger-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ac7488643608199078f7cb58901da1c4e677d262e954d714ca154d9e62a4a97
MD5 44ffc075ee1f1648c6cc87471463a3f4
BLAKE2b-256 52e126655e9216d678dbdb8d9dc1cf7005644837cf623fa66b851e7fc3c104d7

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