From 07196ea676b140d9cfbe46ea546502d343f79b05 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Tue, 11 Sep 2018 10:38:31 +0200 Subject: [PATCH] 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 --- templates/scripts/includes/deployment.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index f3f8193..e8306a3 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -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 }