Commit 8b14175a authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

add new GDebugFlag for fatal_criticals handle G_DEBUG=fatal_criticals, to

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)
parent af1b5472
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:
......
......@@ -65,7 +65,16 @@ variables like <envar>LANG</envar>, <envar>PATH</envar> or <envar>HOME</envar>.
<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>
......
......@@ -30,7 +30,8 @@
G_BEGIN_DECLS
typedef enum {
G_DEBUG_FATAL_WARNINGS = 1 << 0
G_DEBUG_FATAL_WARNINGS = 1 << 0,
G_DEBUG_FATAL_CRITICALS = 1 << 1
} GDebugFlag;
......
......@@ -1069,7 +1069,8 @@ _g_debug_init (void)
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));
......@@ -1083,6 +1084,15 @@ _g_debug_init (void)
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__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment