(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>
/**
- * 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.
*/
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);
}
}
#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"
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);
#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"
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;
}
#include "serviceObj.h"
#include "util.h"
#include "vmware/tools/i18n.h"
+#include "vmware/tools/log.h"
#include "vmware/tools/utils.h"
}
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;
}