mirror of
https://github.com/kaboomserver/server.git
synced 2025-07-28 00:32:41 +00:00
fix: limit debug function name size
For the new bibliothek source, since the function name is so long it ends up merging into the message
This commit is contained in:
parent
6243a0705e
commit
d093e44e12
1 changed files with 2 additions and 2 deletions
|
@ -11,10 +11,10 @@ if [ "$DEBUG" = 1 ]; then
|
||||||
printf '[DEBUG] '
|
printf '[DEBUG] '
|
||||||
|
|
||||||
# If shell supports FUNCNAME, print it
|
# If shell supports FUNCNAME, print it
|
||||||
# The -20 is used to pad the function name with up to 20 spaces on the right.
|
# We make sure the string is less than 19 characters, and pad it with spaces until it's 20.
|
||||||
if [ -n "${FUNCNAME+x}" ]; then
|
if [ -n "${FUNCNAME+x}" ]; then
|
||||||
# shellcheck disable=SC3054 # FUNCNAME support requires array support
|
# shellcheck disable=SC3054 # FUNCNAME support requires array support
|
||||||
printf '%-20s' "${FUNCNAME[1]}"
|
printf '%-*.*s' "20" "19" "${FUNCNAME[1]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$@"
|
echo "$@"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue