From: VMware, Inc <> Date: Mon, 26 Jul 2010 18:33:08 +0000 (-0700) Subject: Modify the gtk toolbox to use vmtoolslib's logging backend. X-Git-Tag: 2010.07.25-280253~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42808ef794b7dbf01e4c1f421187f4fabeeb00aa;p=thirdparty%2Fopen-vm-tools.git Modify the gtk toolbox to use vmtoolslib's logging backend. It can't link directly to the shared library (different rpcin implementation needed), so just recompile the needed file. This removes more calls to Debug_* functions in preparation for retiring vmware-user. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/toolbox/Makefile.am b/open-vm-tools/toolbox/Makefile.am index 63e64b157..38585e493 100644 --- a/open-vm-tools/toolbox/Makefile.am +++ b/open-vm-tools/toolbox/Makefile.am @@ -55,7 +55,6 @@ if HAVE_X11 vmware_toolbox_LDADD += @GTK_LIBS@ vmware_toolbox_SOURCES = - vmware_toolbox_SOURCES += debugStdio.c vmware_toolbox_SOURCES += toolbox-gtk.c vmware_toolbox_SOURCES += toolboxAbout.c vmware_toolbox_SOURCES += toolboxDevices.c @@ -63,10 +62,15 @@ if HAVE_X11 vmware_toolbox_SOURCES += toolboxOptions.c vmware_toolbox_SOURCES += toolboxScripts.c vmware_toolbox_SOURCES += toolboxShrink.c + vmware_toolbox_SOURCES += $(top_srcdir)/libvmtools/fileLogger.c + vmware_toolbox_SOURCES += $(top_srcdir)/libvmtools/stdLogger.c + vmware_toolbox_SOURCES += $(top_srcdir)/libvmtools/sysLogger.c vmware_toolbox_SOURCES += $(top_srcdir)/libvmtools/vmtoolsConfig.c + vmware_toolbox_SOURCES += $(top_srcdir)/libvmtools/vmtoolsLog.c vmware_toolbox_CPPFLAGS = vmware_toolbox_CPPFLAGS += -DG_LOG_DOMAIN=\"toolbox\" + vmware_toolbox_CPPFLAGS += -I$(top_srcdir)/libvmtools # Here's something wacky: automake will muck up the translation of this # conditional if it is indented. For more details, see: diff --git a/open-vm-tools/toolbox/toolbox-gtk.c b/open-vm-tools/toolbox/toolbox-gtk.c index 3c4345bdb..cf8fb8bbb 100644 --- a/open-vm-tools/toolbox/toolbox-gtk.c +++ b/open-vm-tools/toolbox/toolbox-gtk.c @@ -49,6 +49,7 @@ #include "system.h" #include "vmware/guestrpc/tclodefs.h" #include "vmware/guestrpc/timesync.h" +#include "vmware/tools/utils.h" #include "embed_version.h" VM_EMBED_VERSION(TOOLBOXGTK_VERSION_STRING); @@ -1086,11 +1087,7 @@ main(int argc, // IN: ARRAY_SIZEOF(argv) } pConfDict = Toolbox_LoadToolsConf(); - Debug_Set(g_key_file_get_boolean(pConfDict, "logging", CONFNAME_LOG, NULL), - DEBUG_PREFIX); - Debug_EnableToFile(g_key_file_get_string(pConfDict, "logging", - CONFNAME_LOGFILE, NULL), - FALSE); + VMTools_ConfigLogging(G_LOG_DOMAIN, pConfDict, FALSE, FALSE); InitHelpDir(); g_key_file_free(pConfDict);