Skip to main content

log configurator

Simple configurator for the python logging package that allows simultaneous file and shell logging

installation

The log configurator can easily be installed from pypi

pip install log-configurator

usage

Import the package and the default python logging

import log_configurator
import logging

Configure python logging

log_configurator.setup_root_logger()

Create a logging instance in your module as usual and log with it

logger = logging.getLogger(__name__)
logger.info('Log Horizon')

buffer initial output

If you need more complex argument parsing before you can configure the logger you can buffer it and have it logged once you configure your logger.

initial_log = log_configurator.buffer_log()
logger = logging.getLogger(__name__)
logger.info('Early log information')

# <your setup code goes here>

log_configurator.setup_root_logger()
logger.debug(initial_log.getvalue())

The early log output currently can only be logged with one severity level.

Release files for log-configurator 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for log-configurator 0.0.3
File Size Uploaded
log_configurator-0.0.3.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for log-configurator 0.0.3
File Interpreter ABI Platform
log_configurator-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / log_configurator-0.0.3.tar.gz

Download URL log_configurator-0.0.3.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
07ce579f84dee43e686c1ad62288d7201a54855a4e21e2d663a613bb1110c47f
BLAKE2b-256 checksum
How to use checksums
b7b0759d1d3856837eab46b5394f58b840f275c533fcaf3e498b8de9e53029bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.10.12 Linux/5.15.167.4-microsoft-standard-WSL2

Release files / log_configurator-0.0.3-py3-none-any.whl

Download URL log_configurator-0.0.3-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4389ab40297d94cb25420ac75c14db0c8f53e8b1cba51aa526045ff124711fbb
BLAKE2b-256 checksum
How to use checksums
c072215b30dfb4ed7b74ddecac55aa9d01c11c283520d15e0d7925ba9bad2a04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.10.12 Linux/5.15.167.4-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page