]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Cleanup some tools log messages.
authorVMware, Inc <>
Sat, 28 May 2011 20:14:16 +0000 (13:14 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Sat, 28 May 2011 20:14:16 +0000 (13:14 -0700)
(i) demote Log() to "info" level.

Lots of places in our internal code use Log() to report uninteresting things.
Having "message" as the mapping for Log() means our default configuration on
non-release builds will spit out all those messages to syslog / event log.

(ii) Demote some log entries in vmtoolsd and plugins.

These shouldn't really be logged by default, since they may show up in
normal operation. Leave "g_message" for less serious errors only, and
move "status report"-type messages to the info level.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/libvmtools/vmtoolsLog.c
open-vm-tools/services/plugins/guestInfo/guestInfoServer.c
open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c
open-vm-tools/services/vmtoolsd/pluginMgr.c

index 9b2216c672554baddd05324a21a1eea2cdf9a362..5066dce368d5d3132a392398110e7760e9d80959 100644 (file)
@@ -907,7 +907,7 @@ Debug(const char *fmt, ...)
 
 
 /**
- * Logs a message using the G_LOG_LEVEL_MESSAGE level.
+ * Logs a message using the G_LOG_LEVEL_INFO level.
  *
  * @param[in] fmt Log message format.
  */
@@ -919,7 +919,7 @@ Log(const char *fmt, ...)
    if (gPanicCount == 0) {
       va_list args;
       va_start(args, fmt);
-      g_logv(gLogDomain, G_LOG_LEVEL_MESSAGE, fmt, args);
+      g_logv(gLogDomain, G_LOG_LEVEL_INFO, fmt, args);
       va_end(args);
    }
 }
index f783b56677e89e98f7b8bf655e16dc08ce21fcea..0baa48eae0775058fc3fa47d27c1cd78ca3af779 100644 (file)
@@ -55,6 +55,7 @@
 #include "xdrutil.h"
 #include "vmsupport.h"
 #include "vmware/guestrpc/tclodefs.h"
+#include "vmware/tools/log.h"
 #include "vmware/tools/plugin.h"
 #include "vmware/tools/utils.h"
 #include "vmware/tools/vmbackup.h"
@@ -1050,13 +1051,13 @@ TweakGatherLoop(ToolsAppCtx *ctx,
    guestInfoPollInterval = pollInterval;
 
    if (guestInfoPollInterval) {
-      g_message("New poll interval is %us.\n", guestInfoPollInterval / 1000);
+      g_info("New poll interval is %us.\n", guestInfoPollInterval / 1000);
 
       gatherTimeoutSource = g_timeout_source_new(guestInfoPollInterval);
       VMTOOLSAPP_ATTACH_SOURCE(ctx, gatherTimeoutSource, GuestInfoGather, ctx, NULL);
       g_source_unref(gatherTimeoutSource);
    } else {
-      g_message("Poll loop disabled.\n");
+      g_info("Poll loop disabled.\n");
    }
 
    g_clear_error(&gError);
index 2ca516b73208d84870e13b9d751045a7f67bd783..6d2b9eed7c4d5e72471d6bd5b47c985da105c0ac 100644 (file)
@@ -30,6 +30,7 @@
 #include "hgfsServerManager.h"
 #include "vm_assert.h"
 #include "vmware/guestrpc/tclodefs.h"
+#include "vmware/tools/log.h"
 #include "vmware/tools/plugin.h"
 #include "vmware/tools/utils.h"
 
@@ -161,7 +162,7 @@ ToolsOnLoad(ToolsAppCtx *ctx)
 
    if (strcmp(ctx->name, VMTOOLS_GUEST_SERVICE) != 0 &&
        strcmp(ctx->name, VMTOOLS_USER_SERVICE) != 0) {
-      g_message("Unknown container '%s', not loading HGFS plugin.", ctx->name);
+      g_info("Unknown container '%s', not loading HGFS plugin.", ctx->name);
       return NULL;
    }
 
index bfee54da41ff3dc39c770f221cc0a6d62c13f711..1d24abc26a75c8ebf9def9d22b3309eb7429b0f9 100644 (file)
@@ -30,6 +30,7 @@
 #include "serviceObj.h"
 #include "util.h"
 #include "vmware/tools/i18n.h"
+#include "vmware/tools/log.h"
 #include "vmware/tools/utils.h"
 
 
@@ -538,7 +539,7 @@ ToolsCoreLoadDirectory(ToolsAppCtx *ctx,
       }
 
       if (data == NULL) {
-         g_message("Plugin '%s' didn't provide deployment data, unloading.\n", entry);
+         g_info("Plugin '%s' didn't provide deployment data, unloading.\n", entry);
          goto next;
       }