Skip to main content

My standard logging module.

Project description

gbe0 Log

My standard logging module.

Installation

To install from PyPI:

python3 -m pip install gbe0-log

Usage

To use in scripts check example.py.

Example:

## Import module
from gbe0_log import Logger
import logging as log

## Initialize logger
## This only needs to be done once
Logger(verbosity = 5)

## Log some messages
log.critical('A message to log at critical level') # Always logged (verbosity level 0)
log.error('A message to log at error level') # Always logged (verbosity level 0)
log.warning('A message to log at warning level') # Verbosity level 1
log.info('A message to log at info level') # Verbosity level 2
log.verbose('A message to log at verbose level') # Verbosity level 3
log.debug('A message to log at verbose level') # Verbosity level 4
log.trace('A message to log at trace level') # Verbosity level 5

Example Output

Output is to stderr and looks like this:

Log output

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

gbe0-log-1.0.0.tar.gz (5.3 kB view hashes)

Uploaded source

Built Distribution

gbe0_log-1.0.0-py2.py3-none-any.whl (5.4 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page