diff options
author | Martin Schwenke <martin@meltin.net> | 2022-06-06 18:02:31 +1000 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2022-06-18 08:47:17 +0000 |
commit | 959d37e72cc539cf76fb99dbe8fc99ae32e59b63 (patch) | |
tree | 631bee1e18e9feb6544a009aa897ffe9d51ff6eb /ctdb | |
parent | c4e176e46cd4a8392cc1de08ad90d62b3c114079 (diff) | |
download | samba-959d37e72cc539cf76fb99dbe8fc99ae32e59b63.tar.gz |
ctdb-daemon: Use DEBUG() macro for child logging
Directly using dbgtext() with file logging results in a log entry with
no header, which is wrong. This is a regression, introduced in commit
10d15c9e5dfe4e8595d0b322c96f474fc7078f46. Prior to this, CTDB's
callback for file logging would always add a header.
Use DEBUG() instead dbgtext(). Note that DEBUG() effectively compares
the passed script_log_level with DEBUGLEVEL, so an explicit check is
no longer necessary.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15090
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jun 16 13:33:10 UTC 2022 on sn-devel-184
(cherry picked from commit e752f841e682cc571006c09249b03d82aea5f8cd)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_logging.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ctdb/server/ctdb_logging.c b/ctdb/server/ctdb_logging.c index 6fcc0535ddd..1da26b5534c 100644 --- a/ctdb/server/ctdb_logging.c +++ b/ctdb/server/ctdb_logging.c @@ -67,9 +67,7 @@ bool ctdb_logging_init(TALLOC_CTX *mem_ctx, const char *logging, static void write_to_log(const char *buf, unsigned int len) { - if (script_log_level <= DEBUGLEVEL) { - dbgtext("%*.*s\n", len, len, buf); - } + DEBUG(script_log_level, ("%*.*s\n", len, len, buf)); } /* |