summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2015-01-09 14:56:38 -0700
committerChristof Schmitt <cs@samba.org>2015-03-23 21:22:11 +0100
commitc89a33a07a2041e05e3cdcf6cbc0a87ee5e71319 (patch)
tree6dd94aab37d53e9e9f4def7c4211867f816753a7 /lib
parent25bd64ffb2f214fa1230dbc8f9230fc91dd2b786 (diff)
downloadsamba-c89a33a07a2041e05e3cdcf6cbc0a87ee5e71319.tar.gz
debug: Use backends instead of explicitly logging to syslog or file
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/util/debug.c25
1 files changed, 1 insertions, 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;