From 5e0a3eb2e2548b72f68c667f24150e272511e0d0 Mon Sep 17 00:00:00 2001 From: Shoaib Ahmed Date: Sun, 26 May 2019 15:11:35 +0200 Subject: [PATCH] Return if quiet and no file pointer is set --- src/log.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/log.c b/src/log.c index 2e183b0..9a04364 100644 --- a/src/log.c +++ b/src/log.c @@ -90,6 +90,8 @@ void log_set_quiet(int enable) { void log_log(int level, const char *file, int line, const char *fmt, ...) { if (level < L.level) { return; + } else if (L.quiet && !L.fp) { + return; } /* Acquire lock */