From: Christof Schmitt Date: Fri, 9 Jan 2015 21:56:38 +0000 (-0700) Subject: debug: Use backends instead of explicitly logging to syslog or file X-Git-Tag: tdb-1.3.5~311 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c89a33a07a;p=thirdparty%2Fsamba.git debug: Use backends instead of explicitly logging to syslog or file Signed-off-by: Christof Schmitt Reviewed-by: Amitay Isaacs --- diff --git a/lib/util/debug.c b/lib/util/debug.c index 1d8bf811de2..806138a0562 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -1036,30 +1036,7 @@ static int Debug1(const char *msg) goto done; } -#ifdef WITH_SYSLOG - if( current_msg_level < state.settings.syslog ) { - int priority = debug_level_to_priority(current_msg_level); - - /* - * Specify the facility to interoperate with other syslog - * callers (vfs_full_audit for example). - */ - priority |= SYSLOG_FACILITY; - - syslog(priority, "%s", msg); - } -#endif - - check_log_size(); - -#ifdef WITH_SYSLOG - if( !state.settings.syslog_only) -#endif - { - if (state.fd > 0) { - write(state.fd, msg, strlen(msg)); - } - } + debug_backends_log(msg, current_msg_level); done: errno = old_errno;