Merge "Publish readable journal files in the gate"
This commit is contained in:
commit
6caf3c4b67
@ -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
Block a user