Files

20 lines
331 B
Bash

#!/bin/sh
trace()
{
if [ -n "${TRACING}" ]; then
local str="$(date -Is) $$ ${1}"
echo "${str}" 1>&2
echo "${str}" >> /cnlogs/notifier.log
fi
}
trace_rc()
{
if [ -n "${TRACING}" ]; then
local str="$(date -Is) $$ Last return code: ${1}"
echo "${str}" 1>&2
echo "${str}" >> /cnlogs/notifier.log
fi
}