+2005-11-04 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gdebug.h: add new GDebugFlag for fatal_criticals
+ * glib/gmessages.c: (_g_debug_init): handle G_DEBUG=fatal_criticals,
+ to help find critical warnings in applications. (#320017,
+ Vincent Untz)
+
2005-11-02 Tor Lillqvist <tml@novell.com>
* glib/glib.symbols: Remove large amount of trailing whitespace
+2005-11-04 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gdebug.h: add new GDebugFlag for fatal_criticals
+ * glib/gmessages.c: (_g_debug_init): handle G_DEBUG=fatal_criticals,
+ to help find critical warnings in applications. (#320017,
+ Vincent Untz)
+
2005-11-02 Tor Lillqvist <tml@novell.com>
* glib/glib.symbols: Remove large amount of trailing whitespace
+2005-11-04 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/gdebug.h: add new GDebugFlag for fatal_criticals
+ * glib/gmessages.c: (_g_debug_init): handle G_DEBUG=fatal_criticals,
+ to help find critical warnings in applications. (#320017,
+ Vincent Untz)
+
2005-11-02 Tor Lillqvist <tml@novell.com>
* glib/glib.symbols: Remove large amount of trailing whitespace
+2005-11-04 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/running.sgml: Document fatal_criticals.
+
2005-10-26 Matthias Clasen <mclasen@redhat.com>
* gobject/gobject-sections.txt:
<varlistentry>
<term>fatal_warnings</term>
<listitem><para>Causes GLib to abort the program at the first call
- to <link linkend="g-warning">g_warning</link>(). This option is
+ to <link linkend="g-warning">g_warning</link>() or
+ <link linkend="g-critical">g_critical</link>(). This option is
+ special in that it doesn't require GLib to be configured with
+ debugging support.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>fatal_criticals</term>
+ <listitem><para>Causes GLib to abort the program at the first call
+ to <link linkend="g-critical">g_critical</link>(). This option is
special in that it doesn't require GLib to be configured with
debugging support.</para>
</listitem>
G_BEGIN_DECLS
typedef enum {
- G_DEBUG_FATAL_WARNINGS = 1 << 0
+ G_DEBUG_FATAL_WARNINGS = 1 << 0,
+ G_DEBUG_FATAL_CRITICALS = 1 << 1
} GDebugFlag;
if (val != NULL)
{
static const GDebugKey keys[] = {
- {"fatal_warnings", G_DEBUG_FATAL_WARNINGS}
+ {"fatal_warnings", G_DEBUG_FATAL_WARNINGS},
+ {"fatal_criticals", G_DEBUG_FATAL_CRITICALS}
};
_g_debug_flags = g_parse_debug_string (val, keys, G_N_ELEMENTS (keys));
fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
g_log_set_always_fatal (fatal_mask);
}
+
+ if (_g_debug_flags & G_DEBUG_FATAL_CRITICALS)
+ {
+ GLogLevelFlags fatal_mask;
+
+ fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
+ fatal_mask |= G_LOG_LEVEL_CRITICAL;
+ g_log_set_always_fatal (fatal_mask);
+ }
}
#define __G_MESSAGES_C__