def disable_commands_handler(handler: logging.Handler) -> None: """Disable special handler for commands. :param handler: Handler returned by enable_commands_handler """ logging.getLogger().removeHandler(handler) handler.flush() handler.close()
def closeHandler(oldHandler: logging.Handler): oldHandler.flush() oldHandler.close() rootLogger.removeHandler(oldHandler)
def flush(self): r""" """ Handler.flush(self)