Sweet Logs¶
A collection of logging formatters, filters, and functions. Original inspiration came from mCoding’s video on logging in Python.
Free software: GNU General Public License v3
Documentation: https://sweet-logs.readthedocs.io.
Features¶
Utilizing the sweet_logs package can be as simple as importing it and running the setup function. This will configure the root logger to us the JSONFormatter and log to the console via sys.stdout.
import sweet_logs
sweet_logs.setup_logging()
logger = logging.getLogger(__name__)
logger.info('This is an info message')
The setup_logging function can take a few arguments to customize the
logging configuration. What is passed to the config option is passed to the
logging.config.dictConfig
function.
Credits¶
This package was created with Cookiecutter and the jorwoods/cookiecutter-pypackage project template.