From e595efb4c17771a714b64db1d7255b8fc1315cc7 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 8 Jul 2014 21:41:48 +0200 Subject: [PATCH] log: info messages should be logged on syslog but not on first debug level Without `-d`, syslog should log info messages. With `-d`, they should not be displayed. With `-dd`, they should be displayed. This is an amendment of the previous patch. --- src/log.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/log.c b/src/log.c index 4a1647e7..07ea08f2 100644 --- a/src/log.c +++ b/src/log.c @@ -195,9 +195,11 @@ log_info(const char *token, const char *emsg, ...) { va_list ap; - va_start(ap, emsg); - vlog(LOG_INFO, token, emsg, ap); - va_end(ap); + if (!debug || debug > 1 || logh) { + va_start(ap, emsg); + vlog(LOG_INFO, token, emsg, ap); + va_end(ap); + } } static int -- 2.39.5