From 1bb7c90a8d3e17dd6eafd4536e4a8fc6b3d31fea Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 29 May 2007 19:56:21 +0000 Subject: [PATCH] Small fix in the log level when dumping the last messages (elapsed time). --- scripts/functions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/functions b/scripts/functions index 79a14158..4199e921 100644 --- a/scripts/functions +++ b/scripts/functions @@ -102,14 +102,15 @@ CT_DoLog() { # Usage: CT_DoEnd CT_DoEnd() { + local level="$1" CT_STOP_DATE=`CT_DoDate +%s%N` CT_STOP_DATE_HUMAN=`CT_DoDate +%Y%m%d.%H%M%S` - CT_DoLog INFO "Build completed at ${CT_STOP_DATE_HUMAN}" + CT_DoLog "${level:-INFO}" "Build completed at ${CT_STOP_DATE_HUMAN}" elapsed=$((CT_STOP_DATE-CT_STAR_DATE)) elapsed_min=$((elapsed/(60*1000*1000*1000))) elapsed_sec=`printf "%02d" $(((elapsed%(60*1000*1000*1000))/(1000*1000*1000)))` elapsed_csec=`printf "%02d" $(((elapsed%(1000*1000*1000))/(10*1000*1000)))` - CT_DoLog ${1:-INFO} "(elapsed: ${elapsed_min}:${elapsed_sec}.${elapsed_csec})" + CT_DoLog ${level:-INFO} "(elapsed: ${elapsed_min}:${elapsed_sec}.${elapsed_csec})" } # Abort the execution with an error message