def log_to_null(name=None):
 logger = logging.getLogger(name)
 logger.addHandler(NullHandler())

def log_to_null ( name = None ) : logger = logging . getLogger ( name ) logger . addHandler ( NullHandler ( ) )
set up a null handler for the given stream .