Files
parsedmarc/parsedmarc/log.py
T
Dominik BermühlerandGitHub 1d1f9e84b0 Logging silenced if parsedmarc is used as Library (#344)
By default, libraries should not configure their logger to give the developer, who is using the library, the freedom to decide how log messages are logged. For this reason no handler other than the NullHandler or log level should be set by the library.

For more information about this topic see here: https://realpython.com/python-logging-source-code/#library-vs-application-logging-what-is-nullhandler
2022-08-19 13:54:52 -04:00

5 lines
94 B
Python

import logging
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())