From: VMware, Inc <> Date: Sat, 28 May 2011 20:14:16 +0000 (-0700) Subject: Cleanup some tools log messages. X-Git-Tag: 2011.05.27-420096~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b43151e2e76530bb4b6c5a7aa7c9053051cdfaaf;p=thirdparty%2Fopen-vm-tools.git Cleanup some tools log messages. (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 --- diff --git a/open-vm-tools/libvmtools/vmtoolsLog.c b/open-vm-tools/libvmtools/vmtoolsLog.c index 9b2216c67..5066dce36 100644 --- a/open-vm-tools/libvmtools/vmtoolsLog.c +++ b/open-vm-tools/libvmtools/vmtoolsLog.c @@ -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); } } diff --git a/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c b/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c index f783b5667..0baa48eae 100644 --- a/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c +++ b/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c @@ -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); diff --git a/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c b/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c index 2ca516b73..6d2b9eed7 100644 --- a/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c +++ b/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c @@ -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; } diff --git a/open-vm-tools/services/vmtoolsd/pluginMgr.c b/open-vm-tools/services/vmtoolsd/pluginMgr.c index bfee54da4..1d24abc26 100644 --- a/open-vm-tools/services/vmtoolsd/pluginMgr.c +++ b/open-vm-tools/services/vmtoolsd/pluginMgr.c @@ -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; }