2005-06-05 Peter Bartok <pbartok@novell.com>
[mono.git] / mono / utils / mono-logger.c
index ced6ac65732ad874db0cde0dcd714dcd1e35bc57..11162fc19fdea26aed66671c403af632d2a31a2d 100644 (file)
@@ -211,9 +211,9 @@ mono_trace_set_mask_string (char *value)
        char *tok;
        guint32 flags = 0;
 
-       const char *valid_flags[] = {"asm", "type", "dll", "gc", "cfg", "all", NULL};
+       const char *valid_flags[] = {"asm", "type", "dll", "gc", "cfg", "aot", "all", NULL};
        const MonoTraceMask     valid_masks[] = {MONO_TRACE_ASSEMBLY, MONO_TRACE_TYPE, MONO_TRACE_DLLIMPORT,
-                                                 MONO_TRACE_GC, MONO_TRACE_CONFIG, MONO_TRACE_ALL };
+                                                 MONO_TRACE_GC, MONO_TRACE_CONFIG, MONO_TRACE_AOT, MONO_TRACE_ALL };
 
        if(!value)
                return;
@@ -239,3 +239,14 @@ mono_trace_set_mask_string (char *value)
        if(flags)
                mono_trace_set_mask (flags);
 }
+
+/*
+ * mono_trace_is_traced:
+ *
+ *   Returns whenever a message with @level and @mask will be printed or not.
+ */
+gboolean
+mono_trace_is_traced (GLogLevelFlags level, MonoTraceMask mask)
+{
+       return (level <= current_level && mask & current_mask);
+}