sort the logs by timestamp

This commit is contained in:
Seth Vidal 2013-07-08 17:33:42 +00:00
parent 35f1328a49
commit a98ead2ef6
1 changed files with 1 additions and 1 deletions

View File

@ -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):