[Gross] [PATCH 3/3] fix setting log_level

Lauri Tirkkonen ltirkkon at niksula.hut.fi
Mon Jan 19 13:53:48 EET 2015


There is a default setting for log_level in include/conf.h, so it will never
get changed from that default even if set otherwise in the config file. Fix
below.

---
 src/gross.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gross.c b/src/gross.c
index 97a8311..dae24c5 100644
--- a/src/gross.c
+++ b/src/gross.c
@@ -429,8 +429,7 @@ configure_grossd(configlist_t *config)
 		if (strcmp(cp->name, "log_method") == 0) {
 			if (strcmp(cp->value, "syslog") == 0)
 				ctx->config.flags |= FLG_SYSLOG;
-		} else if (strcmp(cp->name, "log_level") == 0 && ctx->config.loglevel == 0) {
-			/* only set loglevel if it's still unset */
+		} else if (strcmp(cp->name, "log_level") == 0) {
 			if (strcmp(cp->value, "debug") == 0)
 				ctx->config.loglevel = GLOG_DEBUG;
 			else if (strcmp(cp->value, "info") == 0)
-- 
1.9.1




More information about the Gross mailing list