mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
sort the logs by timestamp
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user