]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Modify the gtk toolbox to use vmtoolslib's logging backend.
authorVMware, Inc <>
Mon, 26 Jul 2010 18:33:08 +0000 (11:33 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 26 Jul 2010 18:33:08 +0000 (11:33 -0700)
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 <mvanzin@vmware.com>
open-vm-tools/toolbox/Makefile.am
open-vm-tools/toolbox/toolbox-gtk.c

index 63e64b15733b005360cccc1b9eaba34c6d118b19..38585e49321304397969ad649692e2d2ac21ad5a 100644 (file)
@@ -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:
index 3c4345bdbce084da34f23669abe65b39eb73900c..cf8fb8bbb86e9f46222e5caa717c98abc0d75a3b 100644 (file)
@@ -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);