From c89a33a07a2041e05e3cdcf6cbc0a87ee5e71319 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Fri, 9 Jan 2015 14:56:38 -0700 Subject: [PATCH] debug: Use backends instead of explicitly logging to syslog or file Signed-off-by: Christof Schmitt Reviewed-by: Amitay Isaacs --- lib/util/debug.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) 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; -- 2.11.4.GIT