1 #ifndef __MONO_LOGGER_H__
2 #define __MONO_LOGGER_H__
7 MONO_TRACE_ASSEMBLY = (1<<0),
8 MONO_TRACE_TYPE = (1<<1),
9 MONO_TRACE_DLLIMPORT = (1<<2),
10 MONO_TRACE_GC = (1<<3),
11 MONO_TRACE_CONFIG = (1<<4),
12 MONO_TRACE_AOT = (1<<5),
13 MONO_TRACE_ALL = MONO_TRACE_ASSEMBLY |
15 MONO_TRACE_DLLIMPORT |
22 mono_trace_cleanup (void);
25 mono_trace (GLogLevelFlags level, MonoTraceMask mask, const char *format, ...);
28 mono_tracev (GLogLevelFlags level, MonoTraceMask mask, const char *format, va_list args);
31 mono_trace_set_level (GLogLevelFlags level);
34 mono_trace_set_level_string (const char *value);
37 mono_trace_set_mask (MonoTraceMask mask);
40 mono_trace_set_mask_string (char *value);
43 mono_trace_push (GLogLevelFlags level, MonoTraceMask mask);
46 mono_trace_pop (void);
49 mono_trace_is_traced (GLogLevelFlags level, MonoTraceMask mask);
51 #ifdef G_HAVE_ISO_VARARGS
52 #define mono_trace_error(...) mono_trace(G_LOG_LEVEL_ERROR, \
54 #define mono_trace_warning(...) mono_trace(G_LOG_LEVEL_WARNING, \
56 #define mono_trace_message(...) mono_trace(G_LOG_LEVEL_MESSAGE, \
58 #elif defined(G_HAVE_GNUC_VARARGS)
59 #define mono_trace_error(format...) mono_trace(G_LOG_LEVEL_ERROR, \
61 #define mono_trace_warning(format...) mono_trace(G_LOG_LEVEL_WARNING, \
63 #define mono_trace_message(format...) mono_trace(G_LOG_LEVEL_MESSAGE, \
65 #else /* no varargs macros */
67 mono_trace_error(MonoTraceMask mask, const char *format, ...)
70 va_start (args, format);
71 mono_tracev(G_LOG_LEVEL_ERROR, mask, format, args);
76 mono_trace_warning(MonoTraceMask mask, const char *format, ...)
79 va_start (args, format);
80 mono_tracev(G_LOG_LEVEL_WARNING, mask, format, args);
85 mono_trace_message(MonoTraceMask mask, const char *format, ...)
88 va_start (args, format);
89 mono_tracev(G_LOG_LEVEL_MESSAGE, mask, format, args);
93 #endif /* !__GNUC__ */
95 #endif /* __MONO_LOGGER_H__ */