I have the following code:
import logging class A(object): def __init__(self): self._l = self._get_logger() def _get_logger(self): l
Since python 3.2 and newer:
Consider using hasHandlers() to check if a logger has handlers or not.
hasHandlers()
https://docs.python.org/3/library/logging.html#logging.Logger.hasHandlers