Skip to main content

tasklogger

Project description

Latest PyPi version Latest Conda version Travis CI Build Appveyor 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.2.tar.gz (14.9 kB view details)

Uploaded Source

Built Distributions

tasklogger-0.4.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

tasklogger-0.4.2-py2-none-any.whl (14.2 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: tasklogger-0.4.2.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for tasklogger-0.4.2.tar.gz
Algorithm Hash digest
SHA256 3395b08fed86e2a65a9183cbc5f2f303052141058d6008898c57106c4e4c4872
MD5 310087c865435a9e59feccc14e6e7e5d
BLAKE2b-256 39c377621e5e1419d9fb431dbf214fe2e3d847d7f993bd5b9cb732812a0a38a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tasklogger-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.6

File hashes

Hashes for tasklogger-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 868384ed3a2acbd7b2a4bb30095c5a4cda96e5d904aa723cb4045f63d66db94c
MD5 4e9e332fc52d87629d009dd0ddb01fe8
BLAKE2b-256 2e4d9790904bb5ec98dbdeb81b9e52c15f125a3f88103d03d26dbff9cfce3f9c

See more details on using hashes here.

File details

Details for the file tasklogger-0.4.2-py2-none-any.whl.

File metadata

  • Download URL: tasklogger-0.4.2-py2-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for tasklogger-0.4.2-py2-none-any.whl
Algorithm Hash digest
SHA256 5f897974ee51c56ca3db33fd80a93bf08dc8f99cce31433963b8cb51532159d0
MD5 91272ef9db73d8cf4db6c44d2014c778
BLAKE2b-256 6d140b30877a78ad262c7bbd305dc3eb067b34f244087b537acd1e8401a4cd41

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