Small fix in the log level when dumping the last messages (elapsed time).

This commit is contained in:
Yann E. MORIN" 2007-05-29 19:56:21 +00:00
parent abe0c8ba39
commit 1bb7c90a8d

View File

@ -102,14 +102,15 @@ CT_DoLog() {
# Usage: CT_DoEnd <level>
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