Skip to main content

Easy initialization of standard python logging and loguru

Project description

Logutil

(Extremely) easy initialization for logging and loguru

Why

This packages makes initialization of logging and loguru with stream, file, sentry and pushover handlers (extremely) easy.

Installation

  • Logging only: pip install logutil
  • ... + loguru: pip install logutil[loguru]
  • ... + notifiers/sentry: pip install logutil[notifiers]
  • ... + loguru + notifiers/sentry: pip install logutil[all]

Examples

# standard python logging
from logutil import init_logging, get_logging_logger
init_logging('sub1')
logger = get_logging_logger('sub1')
logger.info('Test INFO message (logging)')
logger.warning('Test WARNING message (logging)')
# loguru
from logutil import init_loguru, get_loguru_logger
init_loguru()
logger = get_loguru_logger()
logger.info('Test INFO message (loguru)')
logger.warning('Test WARNING message (loguru)')

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

logutil-0.1.0.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

logutil-0.1.0-py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 3

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