Skip to main content

Parallel logging to console and logfile

Project description

The duallog package

Python package to enable simultaneous logging to console and logfile.

Duallog screenshot

How to install duallog?

You can install duallog using pip, or you can install from source. Below you find instructions for both ways.

Installation via pip

In the terminal, run pip install duallog.

Installation from source

  1. Download and unpack this repository.
  2. Open a terminal and navigate to the repository.
  3. Execute python setup.py install from within the repository.

How to use duallog?

Using duallog is very simple, as illustrated in the following minimal example script.

# Import the duallog package to set up simultaneous logging to screen and console.
import duallog

# Import the logging package to generate log messages.
import logging

# Set up dual logging and tell duallog where to store the logfiles.
duallog.setup('logtest')

# Generate some log messages.
logging.debug('Debug messages are only sent to the logfile.')
logging.info('Info messages are not shown on the console, too.')
logging.warning('Warnings appear both on the console and in the logfile.')
logging.error('Errors get the same treatment.')
logging.critical('And critical messages, of course.')

The output of this program is shown in the screenshot at the top of this page.

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

duallog-0.15.tar.gz (3.1 kB view details)

Uploaded Source

Built Distributions

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

duallog-0.15-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

duallog-0.15-py2.7.egg (5.1 kB view details)

Uploaded Egg

duallog-0.15-py2-none-any.whl (4.2 kB view details)

Uploaded Python 2

File details

Details for the file duallog-0.15.tar.gz.

File metadata

  • Download URL: duallog-0.15.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

File hashes

Hashes for duallog-0.15.tar.gz
Algorithm Hash digest
SHA256 d4740b252bfd936ec390d1880cf786003be4fc149184a963629b40e21bcff3a4
MD5 6344d73820291ac7aca2ed3033305d2b
BLAKE2b-256 528a2c727aeb98b9dbd93a2b7f56ec30e14ce8d51bf3b3463f19c74ba8e6780a

See more details on using hashes here.

File details

Details for the file duallog-0.15-py3-none-any.whl.

File metadata

  • Download URL: duallog-0.15-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

File hashes

Hashes for duallog-0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 923b18952237ac26d51426b9b93855cf173fa84b3c4061a2f27732c5d6be61d3
MD5 d7d32f943a2e499e4ed1a5e51eb964bb
BLAKE2b-256 2124b7880d8b72876cf57dcdff81d5df3fe1a69953ee4a96b3a0e3288a7f508c

See more details on using hashes here.

File details

Details for the file duallog-0.15-py2.7.egg.

File metadata

  • Download URL: duallog-0.15-py2.7.egg
  • Upload date:
  • Size: 5.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.8.1 pkginfo/1.2.1 requests/2.12.4 setuptools/33.1.1 requests-toolbelt/0.7.0 clint/0.5.1 CPython/3.5.3 Linux/4.14.79+

File hashes

Hashes for duallog-0.15-py2.7.egg
Algorithm Hash digest
SHA256 b648b5ef7712afefba7cc268f4f605db0f9dca2e40d3654e068dead607c55236
MD5 67947cd3fdc72229b788bf72d1e6bfd9
BLAKE2b-256 e5e47e37eca8f0dcfdf31374872c43e9d2f0cd7eaac8d6ff7a57c13b7244ede8

See more details on using hashes here.

File details

Details for the file duallog-0.15-py2-none-any.whl.

File metadata

  • Download URL: duallog-0.15-py2-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

File hashes

Hashes for duallog-0.15-py2-none-any.whl
Algorithm Hash digest
SHA256 f6400b6263a2c267a2c19d625b80accbea477fecdf48abc33ac131510a55b4eb
MD5 73fe2ec06981690b8f758ba8b777e5e8
BLAKE2b-256 cb062bb8b86a2463d8671c8a39ecd8750f6abf60f5bffedfc8280775331de3ec

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