TT#37257 Change default debug output style to be more informative

The new output will will provide details about the executed line in code:

> root@spce:~# bash -x /usr/sbin/ngcp-status
> + export 'PS4=+\t (${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): } '
> + PS4='+\t (${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): } '
> +10:43:04 (/usr/sbin/ngcp-status:7): main():  set -e
> +10:43:04 (/usr/sbin/ngcp-status:8): main():  set -u
> +10:43:04 (/usr/sbin/ngcp-status:10): main():  export LC_ALL=C.UTF-8
> +10:43:04 (/usr/sbin/ngcp-status:10): main():  LC_ALL=C.UTF-8
> +10:43:04 (/usr/sbin/ngcp-status:13): main():  '[' -r /etc/debian_version ']'
> ...

Change-Id: I9aeb903703844a8ba0c43832cf1eec897520cc40
changes/90/23390/1
Alexander Lutay 7 years ago
parent bb6f59a0ec
commit 07196ea676

@ -232,14 +232,14 @@ die() {
enable_trace() {
if "${DEBUG_MODE}" ; then
set -x
PS4='+\t '
export PS4='+\t (${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): } '
fi
}
disable_trace() {
if "${DEBUG_MODE}" ; then
set +x
PS4=''
export PS4=''
fi
}

Loading…
Cancel
Save