From 3a42bb6b23f8af674b31733019e9d90a72ea4520 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 17 Jan 2023 09:30:17 +0100 Subject: [PATCH] Output colored debugging info --- gaboshlib/g_echo_debug | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gaboshlib/g_echo_debug diff --git a/gaboshlib/g_echo_debug b/gaboshlib/g_echo_debug new file mode 100644 index 0000000..33df576 --- /dev/null +++ b/gaboshlib/g_echo_debug @@ -0,0 +1,10 @@ +#!/bin/bash + +function g_echo_debug { + [ -z "$1" ] && return 0 + echo -en "\033[97m$(g_date_print) \033[35mDEBUG:" + cat <<< "$@" + echo -en "\033[0m" + [ -z $g_alltosyslog ] && return 0 + g_logger $@ +}