xa-s05:~/scm/multipath-tools-0.4.7# multipathd/multipathd -d
Nov 24 15:22:18 | mpath0: event checker started
Nov 24 15:22:18 | mpath1: event checker started
Nov 24 15:22:18 | path checkers start up
Nov 24 15:22:18 | mpath1: switch to path group #1
Nov 24 15:22:52 | mpath0: switch to path group #4
Nov 24 15:23:00 | mpath1: switch to path group #3
#if DAEMON
#include "log_pthread.h"
+#include <sys/types.h>
+#include <time.h>
#endif
#include "config.h"
thres = (conf) ? conf->verbosity : 0;
if (prio <= thres) {
+#if DAEMON
if (!sink) {
+ time_t t = time(NULL);
+ struct tm *tb = localtime(&t);
+ char buff[16];
+
+ strftime(buff, 16, "%b %d %H:%M:%S", tb);
+
+ fprintf(stdout, "%s | ", buff);
vfprintf(stdout, fmt, ap);
fprintf(stdout, "\n");
}
-#if DAEMON
else
log_safe(prio + 3, fmt, ap);
+#else
+ vfprintf(stdout, fmt, ap);
+ fprintf(stdout, "\n");
#endif
}
va_end(ap);