sort the logs by timestamp
This commit is contained in:
parent
35f1328a49
commit
a98ead2ef6
|
@ -47,7 +47,7 @@ def parse_args(args):
|
|||
|
||||
def search_logs(opts, logfiles):
|
||||
msg = ''
|
||||
for fn in logfiles:
|
||||
for fn in sorted(logfiles):
|
||||
hostname=os.path.basename(fn).replace('.log', '')
|
||||
timestamp = os.path.basename(os.path.dirname(fn))
|
||||
for line in open(fn):
|
||||
|
|
Loading…
Reference in New Issue