#NEWLINE# def set_logger( logger , **kwargs ) : #NEWLINE# #INDENT# logger . handlers = [ ] #NEWLINE# log_to_file = logging . FileHandler ( kwargs [ 'log_file' ] ) #NEWLINE# log_to_file . setLevel ( logging . DEBUG ) #NEWLINE# log_format = logging . Formatter ( kwargs [ 'log_format' ] ) #NEWLINE# log_to_file . setFormatter ( log_format ) #NEWLINE# logger . addHandler ( log_format ) #NEWLINE# logger . propagate = False