Added PID in traces

This commit is contained in:
kexkey
2019-01-10 10:05:24 -05:00
parent 4b2b5a6374
commit a8f7cfb2ef
4 changed files with 8 additions and 8 deletions

View File

@@ -3,13 +3,13 @@
trace() trace()
{ {
if [ -n "${TRACING}" ]; then if [ -n "${TRACING}" ]; then
echo "[$(date +%Y-%m-%dT%H:%M:%S%z)] ${1}" 1>&2 echo "[$(date +%Y-%m-%dT%H:%M:%S%z)] $$ ${1}" 1>&2
fi fi
} }
trace_rc() trace_rc()
{ {
if [ -n "${TRACING}" ]; then if [ -n "${TRACING}" ]; then
echo "[$(date +%Y-%m-%dT%H:%M:%S%z)] Last return code: ${1}" 1>&2 echo "[$(date +%Y-%m-%dT%H:%M:%S%z)] $$ Last return code: ${1}" 1>&2
fi fi
} }

View File

@@ -3,13 +3,13 @@
trace() trace()
{ {
if [ -n "${TRACING}" ]; then if [ -n "${TRACING}" ]; then
echo "$(date -Is) ${1}" 1>&2 echo "$(date -Is) $$ ${1}" 1>&2
fi fi
} }
trace_rc() trace_rc()
{ {
if [ -n "${TRACING}" ]; then if [ -n "${TRACING}" ]; then
echo "$(date -Is) Last return code: ${1}" 1>&2 echo "$(date -Is) $$ Last return code: ${1}" 1>&2
fi fi
} }

View File

@@ -3,13 +3,13 @@
trace() trace()
{ {
if [ -n "${TRACING}" ]; then if [ -n "${TRACING}" ]; then
echo "$(date -Is) ${1}" 1>&2 echo "$(date -Is) $$ ${1}" 1>&2
fi fi
} }
trace_rc() trace_rc()
{ {
if [ -n "${TRACING}" ]; then if [ -n "${TRACING}" ]; then
echo "$(date -Is) Last return code: ${1}" 1>&2 echo "$(date -Is) $$ Last return code: ${1}" 1>&2
fi fi
} }

View File

@@ -3,13 +3,13 @@
trace() trace()
{ {
if [ -n "${TRACING}" ]; then if [ -n "${TRACING}" ]; then
echo "$(date -Is) ${1}" 1>&2 echo "$(date -Is) $$ ${1}" 1>&2
fi fi
} }
trace_rc() trace_rc()
{ {
if [ -n "${TRACING}" ]; then if [ -n "${TRACING}" ]; then
echo "$(date -Is) Last return code: ${1}" 1>&2 echo "$(date -Is) $$ Last return code: ${1}" 1>&2
fi fi
} }