]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Round out Log functions to all levels
authorOliver Kurth <okurth@vmware.com>
Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 3 Jun 2019 20:39:44 +0000 (13:39 -0700)
Logs would be measurably more useful for debugging if the available
levels were used correctly and consistently. As a step towards
encouraging such use, define Log_Warning() and Log_Info() as synonyms
for Warning() and Log() (which, for historical reasons, are not
declared in log.h). Also remove all the conflicting private definitions.

open-vm-tools/lib/include/log.h

index a5b10b87ce16c662fcbd26fa1f9585de654b189a..bd05f36fe55689a605aa571c0ac2bbae100bd093 100644 (file)
@@ -140,9 +140,21 @@ Log_Error(const char *fmt,
 }
 
 
+static INLINE void PRINTF_DECL(1, 2)
+Log_Warning(const char *fmt,
+            ...)
+{
+   va_list ap;
+
+   va_start(ap, fmt);
+   LogV(VMW_LOG_WARNING, fmt, ap);
+   va_end(ap);
+}
+
+
 static INLINE void PRINTF_DECL(1, 2)
 Log_Notice(const char *fmt,
-          ...)
+           ...)
 {
    va_list ap;
 
@@ -152,6 +164,18 @@ Log_Notice(const char *fmt,
 }
 
 
+static INLINE void PRINTF_DECL(1, 2)
+Log_Info(const char *fmt,
+         ...)
+{
+   va_list ap;
+
+   va_start(ap, fmt);
+   LogV(VMW_LOG_INFO, fmt, ap);
+   va_end(ap);
+}
+
+
 static INLINE void PRINTF_DECL(1, 2)
 Log_Verbose(const char *fmt,
             ...)