def grep_log(self, expr, filename='system.log', from_mark=None):
        """
        Returns a list of lines matching the regular expression in parameter
        in the Cassandra log of this node
        """
        matchings = []
        pattern = re.compile(expr)
        with open(os.path.join(self.get_path(), 'logs', filename)) as f:
            if from_mark:
                f.seek(from_mark)
            for line in f:
                m = pattern.search(line)
                if m:
                    matchings.append((line, m))
        return matchings
def grep_log ( self , expr , filename = 'system.log' , from_mark = None ) : matchings = [ ] pattern = re . compile ( expr ) with open ( os . path . join ( self . get_path ( ) , 'logs' , filename ) ) as f : if from_mark : f . seek ( from_mark ) for line in f : m = pattern . search ( line ) if m : matchings . append ( ( line , m ) ) return matchings
Returns a list of lines matching the regular expression in parameter
        in the Cassandra log of this node