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
Release history Release notifications | RSS feed
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)