mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
log grabbing: obtain timestamps on extra services
Previously if any test jobs added additional log dumps, such as `containerd-installation` for example, the logs would grabbed with `sudo journalctl --output=cat`. `--output=cat` excludes timestamps which makes debugging difficult. Let's use `short-precise` output similar to to the other log grabbing commands which includes timestamps. Signed-off-by: David Porter <david@porter.me>
This commit is contained in:
parent
3866cb91f2
commit
0ec1530e41
@ -199,7 +199,7 @@ function save-logs() {
|
|||||||
log-dump-ssh "${node_name}" "sudo journalctl --output=short-precise -k" > "${dir}/kern.log" || true
|
log-dump-ssh "${node_name}" "sudo journalctl --output=short-precise -k" > "${dir}/kern.log" || true
|
||||||
|
|
||||||
for svc in "${services[@]}"; do
|
for svc in "${services[@]}"; do
|
||||||
log-dump-ssh "${node_name}" "sudo journalctl --output=cat -u ${svc}.service" > "${dir}/${svc}.log" || true
|
log-dump-ssh "${node_name}" "sudo journalctl --output=short-precise -u ${svc}.service" > "${dir}/${svc}.log" || true
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$dump_systemd_journal" == "true" ]]; then
|
if [[ "$dump_systemd_journal" == "true" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user