fix: switch back to printf for log outputs
This commit is contained in:
parent
dac9883008
commit
f3c1423c12
@ -8,7 +8,7 @@ log() {
|
|||||||
message="$2"
|
message="$2"
|
||||||
timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
||||||
script_name="$(basename "$0")"
|
script_name="$(basename "$0")"
|
||||||
echo >&2 "${timestamp} [${level}] [$script_name] ${message}"
|
printf >&2 "%s [%s] [%s] %b" "${timestamp}" "${level}" "$script_name" "${message}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Log the given message at INFO level. All logs are written to stderr with a timestamp.
|
# Log the given message at INFO level. All logs are written to stderr with a timestamp.
|
||||||
|
Loading…
Reference in New Issue
Block a user