#NEWLINE# def set_logging( self , log_level = logging . ERROR , file_path_name = None ) : #NEWLINE# #INDENT# "\n        This function allows to change the logging backend, either output or file as backend\n        It also allows to set the logging level (whether to display only critical/error/info/debug.\n        e.g.\n        yag = yagmail.SMTP()\n        yag.set_logging(yagmail.logging.DEBUG)  # to see everything\n\n        and\n\n        yagmail.set_logging(yagmail.logging.DEBUG, 'somelocalfile.log')\n\n        lastly, a log_level of None will make sure there is no I/O.\n        " #NEWLINE# self . log = get_logger ( self , file_path_name )