00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _VMTOOLSINT_H_
00020 #define _VMTOOLSINT_H_
00021
00028 #include "vmware/tools/utils.h"
00029
00030
00031
00032
00033
00034 void
00035 VMToolsMsgCleanup(void);
00036
00037
00038
00039
00040
00041 #define LOGGING_GROUP "logging"
00042
00043 struct LogHandlerData;
00044
00045 typedef void (*LogErrorFn)(const gchar *domain,
00046 GLogLevelFlags level,
00047 const gchar *fmt,
00048 ...);
00049 typedef gboolean (*VMToolsLogFn)(const gchar *domain,
00050 GLogLevelFlags level,
00051 const gchar *message,
00052 struct LogHandlerData *data,
00053 LogErrorFn errfn);
00054 typedef void (*LogHandlerDestroyFn)(struct LogHandlerData *data);
00055 typedef void (*LogHandlerCopyFn)(struct LogHandlerData *current,
00056 struct LogHandlerData *old);
00057
00058 typedef struct LogHandlerData {
00059 VMToolsLogFn logfn;
00060
00061
00062
00063 gboolean convertToLocal;
00064
00065 gboolean timestamp;
00066
00067 gboolean shared;
00068
00069 LogHandlerCopyFn copyfn;
00070
00071
00072
00073 LogHandlerDestroyFn dtor;
00074
00075 guint type;
00076 gchar *domain;
00077 GLogLevelFlags mask;
00078 guint handlerId;
00079 gboolean inherited;
00080 } LogHandlerData;
00081
00082
00083 LogHandlerData *
00084 VMFileLoggerConfig(const gchar *defaultDomain,
00085 const gchar *domain,
00086 const gchar *name,
00087 GKeyFile *cfg);
00088
00089 LogHandlerData *
00090 VMStdLoggerConfig(const gchar *defaultDomain,
00091 const gchar *domain,
00092 const gchar *name,
00093 GKeyFile *cfg);
00094
00095 #if defined(_WIN32)
00096 LogHandlerData *
00097 VMDebugOutputConfig(const gchar *defaultDomain,
00098 const gchar *domain,
00099 const gchar *name,
00100 GKeyFile *cfg);
00101 #else
00102 LogHandlerData *
00103 VMSysLoggerConfig(const gchar *defaultDomain,
00104 const gchar *domain,
00105 const gchar *name,
00106 GKeyFile *cfg);
00107 #endif
00108
00109 #endif
00110