Nicer step by step logging

This commit is contained in:
Julien Malik 2015-09-09 09:58:37 +02:00
parent b47bd6a4c2
commit a57efabd4f

View file

@ -63,10 +63,9 @@ $1
} }
step() { step() {
echo "------ [ $(date --rfc-3339=seconds) ] - [ start $1 ] -------------------------------------" >> $YUNOHOST_LOG printf "[ $(date --rfc-3339=seconds) ] ----- [ entering %-30s ]\n" "$1" >> $YUNOHOST_LOG
$* $*
local return_code="$?" local return_code="$?"
echo "------ [ $(date --rfc-3339=seconds) ] - [ end $1 ] -------------------------------------" >> $YUNOHOST_LOG
return $return_code return $return_code
} }