[PATCH] debug: Fix default log levels

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Jun 3 08:46:52 MDT 2015


Hi, Christof!

Without this patch I end up spamming syslog with debug level
1000.

Review&push appreciated!

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 272538d5b0ad2a5494fd93162f0b63a05aafb76e Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 3 Jun 2015 14:34:31 +0000
Subject: [PATCH] debug: Fix default log levels

According to man smb.conf, the log level with the "logging=" parameter is
separated by @, not :.

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 lib/util/debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/util/debug.c b/lib/util/debug.c
index 81d0cf6..44338c5 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -783,10 +783,10 @@ void debug_set_settings(struct debug_settings *settings,
 	if (len == 0) {
 		if (syslog_only) {
 			snprintf(fake_param, sizeof(fake_param),
-				 "syslog:%d", syslog_level - 1);
+				 "syslog@%d", syslog_level - 1);
 		} else {
 			snprintf(fake_param, sizeof(fake_param),
-				 "syslog:%d file:%d", syslog_level -1,
+				 "syslog@%d file@%d", syslog_level -1,
 				 MAX_DEBUG_LEVEL);
 		}
 
-- 
1.9.1



More information about the samba-technical mailing list