libmultipath: condlog: log to stderr
authorMartin Wilck <mwilck@suse.com>
Sat, 13 Jan 2018 21:19:21 +0000 (22:19 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 7 Mar 2018 08:27:53 +0000 (09:27 +0100)
Calling 'multipath' might result in various error messages, all
of which should be directed to stderr.
Having them intermixed with the actual output on stdout makes
parsing really hard.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/debug.c

index f89b264..f95a3e5 100644 (file)
@@ -37,9 +37,9 @@ void dlog (int sink, int prio, const char * fmt, ...)
                                         "%b %d %H:%M:%S", tb);
                                buff[sizeof(buff)-1] = '\0';
 
-                               fprintf(stdout, "%s | ", buff);
+                               fprintf(stderr, "%s | ", buff);
                        }
-                       vfprintf(stdout, fmt, ap);
+                       vfprintf(stderr, fmt, ap);
                }
                else
                        log_safe(prio + 3, fmt, ap);