def new_iteration ( self , prefix ) : # Flush data for the current iteration self . flush ( ) # Fix prefix self . prefix [ - 1 ] = prefix self . reset_formatter ( )
reset logging handler at end of iteration python
When inside a loop logger created a new iteration
def new_iteration(self, prefix):
        """When inside a loop logger, created a new iteration
        """
        # Flush data for the current iteration
        self.flush()

        # Fix prefix
        self.prefix[-1] = prefix
        self.reset_formatter()