Please sign in to comment.
- Loading branch information...
|@@ -1,8 +1,15 @@|
|+ '''Read log file, created by sonar daemon'''|
|def __init__(self, path):|
|self.path = path|
|def tail(self, size, verbosity='info'):|
|+ Return to client list of special Entry objects (one per each line in log)|
|+ Method will reverse lines order as unix util `tail` done|
|+ It also can filter entiries by verbosity level (will return higher)|
|with open(self.path) as log:|
|lines = [MonitorEntry.extract(line) for line in log.readlines()[::-1]]|