From: Martin Schwenke Date: Sun, 16 Jul 2023 10:52:54 +0000 (+1000) Subject: ctdb-scripts: Support script logging to stderr X-Git-Tag: ldb-2.8.0~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef15a34d5dd0d90e52f0fc76123077bebba949e9;p=thirdparty%2Fsamba.git ctdb-scripts: Support script logging to stderr Logging in statd-callout tests is currently useless. This will provide a way of seeing errors in those tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/config/functions b/ctdb/config/functions index 7dcd2708357..56105aab165 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -95,6 +95,13 @@ script_log() shift case "$CTDB_LOGGING" in + file:) + if [ -n "$*" ] ; then + echo "$*" + else + cat + fi >&2 + ;; file:* | "") if [ -n "$CTDB_LOGGING" ]; then _file="${CTDB_LOGGING#file:}"