X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fmono-logger.h;h=3f07378c769bc68b668eefdd378ca45e88dbfe7c;hb=5df3fd4797d5529466d0507d18f1ae312c082b4f;hp=6cb56d27b91c5792548b672b4d20435a80091b34;hpb=af90548a08ef5effc93b083b7eec44daa178b141;p=mono.git diff --git a/mono/utils/mono-logger.h b/mono/utils/mono-logger.h index 6cb56d27b91..3f07378c769 100644 --- a/mono/utils/mono-logger.h +++ b/mono/utils/mono-logger.h @@ -1,99 +1,15 @@ #ifndef __MONO_LOGGER_H__ #define __MONO_LOGGER_H__ -#include +#include +MONO_BEGIN_DECLS -G_BEGIN_DECLS - -typedef enum { - MONO_TRACE_ASSEMBLY = (1<<0), - MONO_TRACE_TYPE = (1<<1), - MONO_TRACE_DLLIMPORT = (1<<2), - MONO_TRACE_GC = (1<<3), - MONO_TRACE_CONFIG = (1<<4), - MONO_TRACE_AOT = (1<<5), - MONO_TRACE_ALL = MONO_TRACE_ASSEMBLY | - MONO_TRACE_TYPE | - MONO_TRACE_DLLIMPORT | - MONO_TRACE_GC | - MONO_TRACE_CONFIG | - MONO_TRACE_AOT -} MonoTraceMask; - -void -mono_trace_cleanup (void); - -void -mono_trace (GLogLevelFlags level, MonoTraceMask mask, const char *format, ...); - -void -mono_tracev (GLogLevelFlags level, MonoTraceMask mask, const char *format, va_list args); - -void -mono_trace_set_level (GLogLevelFlags level); - -void +MONO_API void mono_trace_set_level_string (const char *value); -void -mono_trace_set_mask (MonoTraceMask mask); - -void -mono_trace_set_mask_string (char *value); - -void -mono_trace_push (GLogLevelFlags level, MonoTraceMask mask); - -void -mono_trace_pop (void); - -gboolean -mono_trace_is_traced (GLogLevelFlags level, MonoTraceMask mask); - -#ifdef G_HAVE_ISO_VARARGS -#define mono_trace_error(...) mono_trace(G_LOG_LEVEL_ERROR, \ - __VA_ARGS__) -#define mono_trace_warning(...) mono_trace(G_LOG_LEVEL_WARNING, \ - __VA_ARGS__) -#define mono_trace_message(...) mono_trace(G_LOG_LEVEL_MESSAGE, \ - __VA_ARGS__) -#elif defined(G_HAVE_GNUC_VARARGS) -#define mono_trace_error(format...) mono_trace(G_LOG_LEVEL_ERROR, \ - format) -#define mono_trace_warning(format...) mono_trace(G_LOG_LEVEL_WARNING, \ - format) -#define mono_trace_message(format...) mono_trace(G_LOG_LEVEL_MESSAGE, \ - format) -#else /* no varargs macros */ -static void -mono_trace_error(MonoTraceMask mask, const char *format, ...) -{ - va_list args; - va_start (args, format); - mono_tracev(G_LOG_LEVEL_ERROR, mask, format, args); - va_end (args); -} - -static void -mono_trace_warning(MonoTraceMask mask, const char *format, ...) -{ - va_list args; - va_start (args, format); - mono_tracev(G_LOG_LEVEL_WARNING, mask, format, args); - va_end (args); -} - -static void -mono_trace_message(MonoTraceMask mask, const char *format, ...) -{ - va_list args; - va_start (args, format); - mono_tracev(G_LOG_LEVEL_MESSAGE, mask, format, args); - va_end (args); -} - -G_END_DECLS +MONO_API void +mono_trace_set_mask_string (const char *value); -#endif /* !__GNUC__ */ +MONO_END_DECLS #endif /* __MONO_LOGGER_H__ */