libmultipath: avoid syslog loglevel > LOG_DEBUG
authorMartin Wilck <mwilck@suse.com>
Mon, 10 Dec 2018 09:49:55 +0000 (10:49 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 10 Dec 2018 23:41:04 +0000 (00:41 +0100)
We use condlog(5, ...) in some places, which doesn't work well
with syslog.

Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/log_pthread.c

index bb35dfc..be57bb1 100644 (file)
@@ -25,6 +25,9 @@ static int log_messages_pending;
 
 void log_safe (int prio, const char * fmt, va_list ap)
 {
+       if (prio > LOG_DEBUG)
+               prio = LOG_DEBUG;
+
        if (log_thr == (pthread_t)0) {
                vsyslog(prio, fmt, ap);
                return;