aboutsummaryrefslogtreecommitdiff
path: root/logger.sh
blob: 600f0ba32e6ec1b555cfce36c8cbccc1d05ee06e (plain)
1
2
3
4
5
6
7
8
9
10
_atrocity_log_output="${ATROCITY_LOG:-$(tty)}"
if [ "$_atrocity_log_output" = "not a tty" ]; then
	exec {_atrocity_log_descriptor}>&1
else
	exec {_atrocity_log_descriptor}>"$_atrocity_log_output"
fi

atrocity_debug() {
	printf 'DBG : %s\n' "${*}" >&"$_atrocity_log_descriptor"
}