mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-29 18:53:52 +00:00
log action on error
This commit is contained in:
parent
7644c6c14c
commit
dba4f95e9a
@ -11,7 +11,7 @@
|
|||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.96-pre-10-gf96625e
|
#### $$VERSION$$ v0.96-pre-11-g7644c6c
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 sucess (hopefully)
|
# - 0 sucess (hopefully)
|
||||||
@ -407,8 +407,8 @@ sendJsonResult(){
|
|||||||
BOTSENT[DESCRIPTION]="Timeout or broken/no connection"
|
BOTSENT[DESCRIPTION]="Timeout or broken/no connection"
|
||||||
fi
|
fi
|
||||||
# log error
|
# log error
|
||||||
printf "%s: RESULT=%s ACTION=%s CHAT[ID]=%s ERROR=%s DESC=%s\n" "$(date)"\
|
printf "%s: RESULT=%s FUNC=%s CHAT[ID]=%s ERROR=%s DESC=%s\n=ACTION=%s\n" "$(date)"\
|
||||||
"${BOTSENT[OK]}" "${2}" "${3}" "${BOTSENT[ERROR]}" "${BOTSENT[DESCRIPTION]}"
|
"${BOTSENT[OK]}" "${2}" "${3}" "${BOTSENT[ERROR]}" "${BOTSENT[DESCRIPTION]}" "${4/[$'\n\r']*}"
|
||||||
# warm path, do not retry on error, also if we use wegt
|
# warm path, do not retry on error, also if we use wegt
|
||||||
[ -n "${BOTSEND_RETRY}${BASHBOT_WGET}" ] && return
|
[ -n "${BOTSEND_RETRY}${BASHBOT_WGET}" ] && return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user