Add log_trace log target for when verbose > 2

diff --git usr.sbin/vmd/log.c usr.sbin/vmd/log.c
index a6b0db9c264..55578f11e40 100644
--- usr.sbin/vmd/log.c
+++ usr.sbin/vmd/log.c
@@ -40,6 +40,8 @@ void  log_info(const char *, ...)
            __attribute__((__format__ (printf, 1, 2)));
 void   log_debug(const char *, ...)
            __attribute__((__format__ (printf, 1, 2)));
+void   log_trace(const char *, ...)
+           __attribute__((__format__ (printf, 1, 2)));
 void   logit(int, const char *, ...)
            __attribute__((__format__ (printf, 2, 3)));
 void   vlog(int, const char *, va_list)
@@ -175,6 +177,18 @@ log_debug(const char *emsg, ...)
        }
 }
 
+void
+log_trace(const char *emsg, ...)
+{
+       va_list  ap;
+
+       if (verbose > 2) {
+               va_start(ap, emsg);
+               vlog(LOG_DEBUG, emsg, ap);
+               va_end(ap);
+       }
+}
+
 static void
 vfatalc(int code, const char *emsg, va_list ap)
 {
diff --git usr.sbin/vmd/proc.h usr.sbin/vmd/proc.h
index b91f3a5fecb..cce48d72137 100644
--- usr.sbin/vmd/proc.h
+++ usr.sbin/vmd/proc.h
@@ -208,6 +208,8 @@ void        log_info(const char *, ...)
            __attribute__((__format__ (printf, 1, 2)));
 void   log_debug(const char *, ...)
            __attribute__((__format__ (printf, 1, 2)));
+void   log_trace(const char *, ...)
+           __attribute__((__format__ (printf, 1, 2)));
 void   logit(int, const char *, ...)
            __attribute__((__format__ (printf, 2, 3)));
 void   vlog(int, const char *, va_list)
-- 
2.14.1

Reply via email to