Merge "Publish readable journal files in the gate"

This commit is contained in:
Zuul 2018-12-17 21:11:03 +00:00 committed by Gerrit Code Review
commit 6caf3c4b67

View File

@ -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
}