#NEWLINE# def filter( self , record ) : #NEWLINE# #INDENT# t = time . time ( ) #NEWLINE# elapsed = ( self - self . last_message_time ) #NEWLINE# self . last_message_time = t #NEWLINE# message = ( record . levelno , record . name , record . msg , record . args ) #NEWLINE# if ( ( message == self . last_message ) and ( elapsed < log_message_cooldown ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# self . last_message = message #NEWLINE# if ( record . levelno >= logging . ERROR ) : #NEWLINE# #INDENT# self . counter [ record . name ] += 1 #NEWLINE# if ( self . counter [ record . name ] <= 2 ) : #NEWLINE# #INDENT# self . vim . call ( 'deoplete#util#print_error' , record . getMessage ( ) ) #NEWLINE# #UNINDENT# if ( record . exc_info and record . stack_info ) : #NEWLINE# #INDENT# self . counter [ record . name ] += 1 #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . counter [ record . name ] < 2 ) : #NEWLINE# #INDENT# self . counter [ record . name ] = 0 #NEWLINE# #UNINDENT# #UNINDENT# return True