logging.Logger.hasHandlers()

Logger.hasHandlers()

Checks to see if this logger has any handlers configured. This is done by looking for handlers in this logger and its parents in the logger hierarchy. Returns True if a handler was found, else False. The method stops searching up the hierarchy whenever a logger with the ‘propagate’ attribute set to False is found - that will be the last logger which is checked for the existence of handlers.

New in version 3.2.

doc_python
2016-10-07 17:36:22
Comments
Leave a Comment

Please login to continue.