40
41
* ************************************************************************** */
42
#define LOGGING_GROUP "logging"
44
struct LogHandlerData;
46
typedef void (*LogErrorFn)(const gchar *domain,
50
typedef gboolean (*VMToolsLogFn)(const gchar *domain,
53
struct LogHandlerData *data,
55
typedef void (*LogHandlerDestroyFn)(struct LogHandlerData *data);
56
typedef void (*LogHandlerCopyFn)(struct LogHandlerData *current,
57
struct LogHandlerData *old);
59
typedef struct LogHandlerData {
60
VMToolsLogFn logfn; ///< Function that does the logging.
61
/// Same as GLogFunc but returns
62
/// whether the message was
63
/// successfully logged.
64
gboolean convertToLocal; ///< Whether to config the message to the
65
/// local encoding before printing.
66
gboolean timestamp; ///< Whether to include timestamps in
68
gboolean shared; ///< Whether the log output is shared
69
/// among various processes.
70
LogHandlerCopyFn copyfn; ///< Copy function (optional). This is
71
/// used when replacing an existing
72
/// config with a new one for the
74
LogHandlerDestroyFn dtor; ///< Destructor for the handler data.
75
/* Fields below managed by the common code. */
85
VMFileLoggerConfig(const gchar *defaultDomain,
91
VMStdLoggerConfig(const gchar *defaultDomain,
98
VMEventLoggerConfig(const gchar *defaultDomain,
104
VMDebugOutputConfig(const gchar *defaultDomain,
110
VMSysLoggerConfig(const gchar *defaultDomain,
117
VMXLoggerConfig(const gchar *defaultDomain,
44
VMToolsCreateVMXLogger(void);
122
46
/* ************************************************************************** *