mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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 commit10d15c9e5d
. 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 commite752f841e6
)
This commit is contained in:
parent
c4e176e46c
commit
959d37e72c
@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user