From c85956ffd559ac2a2787774a4b56f2ee37f16a8d Mon Sep 17 00:00:00 2001 From: Joe cooper Date: Fri, 26 May 2017 17:00:43 -0500 Subject: [PATCH] Some more positional printf --- slib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slib.sh b/slib.sh index c8acc71..b1eb74a 100644 --- a/slib.sh +++ b/slib.sh @@ -155,7 +155,7 @@ log() { if [ "$log_level_stdout" -le "$log_level_int" ]; then # STDOUT today=$(date +"%Y-%m-%d %H:%M:%S %Z") - printf "${log_color}[${today}] [${log_level}] ${log_text} ${LOG_DEFAULT_COLOR}\n"; + printf "%s[%s] [%s] %s%s\n" "$log_color" "$today" "$log_levvel" "$log_text" "$LOG_DEFAULT_COLOR"; fi # This is all very tricky; figures out a numeric value to compare. eval log_level_log="\$LOG_LEVEL_${LOG_LEVEL_LOG}"