Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _VMTOOLS_LOG_H_
00020 #define _VMTOOLS_LOG_H_
00021
00112 #if !defined(G_LOG_DOMAIN)
00113 # error "G_LOG_DOMAIN must be defined."
00114 #endif
00115
00116 #include <glib.h>
00117
00118 #if defined(__GNUC__)
00119 # define FUNC __func__
00120 #else
00121 # define FUNC __FUNCTION__
00122 #endif
00123
00124 #ifndef g_info
00125
00126
00127
00138 #define g_info(fmt, ...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, fmt, ## __VA_ARGS__)
00139 #endif
00140
00141
00142
00143
00155 #define vm_critical(fmt, ...) g_critical("%s: " fmt, FUNC, ## __VA_ARGS__)
00156
00158 #define vm_debug(fmt, ...) g_debug("%s: " fmt, FUNC, ## __VA_ARGS__)
00159
00161 #define vm_error(fmt, ...) g_error("%s: " fmt, FUNC, ## __VA_ARGS__)
00162
00164 #define vm_info(fmt, ...) g_info("%s: " fmt, FUNC, ## __VA_ARGS__)
00165
00167 #define vm_message(fmt, ...) g_message("%s: " fmt, FUNC, ## __VA_ARGS__)
00168
00170 #define vm_warning(fmt, ...) g_warning("%s: " fmt, FUNC, ## __VA_ARGS__)
00171
00172 G_BEGIN_DECLS
00173
00174 void
00175 VMTools_ConfigLogging(const gchar *defaultDomain,
00176 GKeyFile *cfg,
00177 gboolean force,
00178 gboolean reset);
00179
00180 G_END_DECLS
00181
00184 #endif
00185