Publish readable journal files in the gate
The published journal files seem to be corrupted when compressed and published to gate logs. Find the journal files and create a text file for each that can be readable within a browser. Remove the original journal files afterwards to conserve space. Change-Id: I5a0bfd465d93570b09175b39291cfe7791c91c3e
This commit is contained in:
parent
93eb9040ab
commit
54fb1055e8
|
@ -136,9 +136,14 @@ function find_log_files {
|
|||
}
|
||||
|
||||
function rename_log_files {
|
||||
JOURNALCTL_CMD="journalctl --output=short --file"
|
||||
find_log_files |\
|
||||
while read filename; do \
|
||||
mv ${filename} ${filename}.txt || echo "WARNING: Could not rename ${filename}"; \
|
||||
if [[ $filename =~ \.journal$ ]]; then
|
||||
${JOURNALCTL_CMD} ${filename} > ${filename}.txt || echo "WARNING: Could not rename ${filename}"; \
|
||||
else
|
||||
mv ${filename} ${filename}.txt || echo "WARNING: Could not rename ${filename}"; \
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue