#NEWLINE# def _set_screen_handler( self , log , enable , stream = None ) : #NEWLINE# #INDENT# h = self . _get_builtin_handler ( log , 'screen' ) #NEWLINE# if enable : #NEWLINE# #INDENT# if ( not h ) : #NEWLINE# #INDENT# if ( stream is None ) : #NEWLINE# #INDENT# stream = sys . stderr #NEWLINE# #UNINDENT# h = logging . StreamHandler ( stream ) #NEWLINE# h . setFormatter ( logfmt ) #NEWLINE# h . _cpbuiltin = 'screen' #NEWLINE# log . addHandler ( h ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if h : #NEWLINE# #INDENT# log . handlers . remove ( log )