#NEWLINE# def emit( self , record ) : #NEWLINE# #INDENT# '\n                Emit a record.\n\n                First check if the underlying file has changed, and if it\n                has, close the old stream and reopen the file to get the\n                current stream.\n                ' #NEWLINE# if ( not os . path . exists ( self . baseFilename ) ) : #NEWLINE# #INDENT# stat = None #NEWLINE# changed = 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# stat = os . stat ( self . baseFilename ) #NEWLINE# changed = ( ( stat [ ST_DEV ] != self . dev ) or ( stat [ ST_INO ] != self . ino ) ) #NEWLINE# #UNINDENT# if ( stat and ( self . stream is not None ) ) : #NEWLINE# #INDENT# self . stream . flush ( ) #NEWLINE# self . stream . close ( ) #NEWLINE# self . stream = self . _open ( ) #NEWLINE# if ( stat is None ) : #NEWLINE# #INDENT# stat = os . stat ( self . baseFilename ) #NEWLINE# #UNINDENT# ( self . dev , self . ino ) = ( stat [ ST_DEV ] , stat [ ST_INO ] ) #NEWLINE# #UNINDENT# logging . FileHandler . emit ( self , record )