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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

tasklogger-0.4.1-py2-none-any.whl (14.3 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for tasklogger-0.4.1.tar.gz
Algorithm Hash digest
SHA256 5e4419084ad9cce904c8a201ffa646d966535a40c1754bc3fb1a86c3cdba9486
MD5 6fe9403ffa455a7916715723ad78c7a2
BLAKE2b-256 b5de04ec10ffa1157e134917c65dd3d5e1fcd6690cfa07eb9763f6bd8f6e0335

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tasklogger-0.4.1-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.6.3

File hashes

Hashes for tasklogger-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03345a4b82d5d10043f6056d180c7fb468ad39d89e21092fef57883a486d63bc
MD5 a57847b7042194ab4f53dc5104b8a5fa
BLAKE2b-256 27026c7a14d210876a0df60e4deeef1fc6213cb166b53e35b47fe5bd5fbfe193

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tasklogger-0.4.1-py2-none-any.whl
Algorithm Hash digest
SHA256 2e9746e27309f43f05c2c9339910e40159b0c62ab3c8eb151e9c9b531e00f1f4
MD5 e168d02f0adf4663d3b77214b75ac92a
BLAKE2b-256 703651ebf11cafc3bde34538845ed9e1195da7763f16238dc770ff17b55f271a

See more details on using hashes here.

Supported by

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