Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cloudinit/analyze/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def parse_ci_logline(line):
# Apr 30 19:39:11 cloud-init[2673]: handlers.py[DEBUG]: start: \
# init-local/check-cache: attempting to read from cache [check]

separators = [' - ', ' [CLOUDINIT] ', ' cloud-init[']
amazon_linux_2_sep = ' cloud-init['
separators = [' - ', ' [CLOUDINIT] ', amazon_linux_2_sep]
found = False
for sep in separators:
if sep in line:
Expand All @@ -101,7 +102,7 @@ def parse_ci_logline(line):
hostname = extra.split()[-1]
else:
hostname = timehost.split()[-1]
if sep == ' cloud-init[':
if sep == amazon_linux_2_sep:
# This is an Amazon Linux style line, with no hostname and a PID.
# Use the whole of timehost as timestampstr, and strip off the PID
# from the start of eventstr.
Expand Down