32 lines
421 B
Bash
32 lines
421 B
Bash
# logging functions
|
|
_log() {
|
|
local type="$1"
|
|
shift
|
|
printf '%s [%s] [entrypoint]: %s\n' "$(date -R)" "$type" "$*"
|
|
}
|
|
|
|
logNotice() {
|
|
_log NOTICE "$@"
|
|
}
|
|
logWarning() {
|
|
_log WARNING "$@" >&2
|
|
}
|
|
logError() {
|
|
_log ERROR "$@" >&2
|
|
exit 1
|
|
}
|
|
|
|
startWaiting() {
|
|
local type="NOTICE"
|
|
printf '%s [%s] [entrypoint]: %s' "$(date -R)" "$type" "$*"
|
|
}
|
|
|
|
waiting() {
|
|
sleep 1
|
|
printf '.'
|
|
}
|
|
|
|
finishWaiting() {
|
|
printf '\n'
|
|
}
|