From d32f48031ddfb8a79b87862c2c95e89304399e77 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sun, 21 May 2023 15:56:04 +0200 Subject: [PATCH] fix on_interrupt with logger --- script | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script b/script index ba1179c..1844dcf 100755 --- a/script +++ b/script @@ -25,7 +25,8 @@ EOH } on_interrupt() { - print "Process aborted!\n" + log -l notice "" + log -l notice "Process aborted!" exit 130 } @@ -77,7 +78,7 @@ log() { esac if [ $LEVEL -ge $LOG_VERBOSE_VALUE ]; then - printf "%s" "$*" | while IFS='' read -r LINE; do + printf "%s\n" "$*" | while IFS='' read -r LINE; do printf "%s%s%s\n" "${COLOR:-}" "${TIME:-}" "$LINE" >&2 done fi