projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4db44f5
)
g_debug should not dump output if debug flags or parameters are out.
author
Jose Dapena Paz
<jdapena@igalia.com>
Sun, 31 May 2009 17:41:43 +0000
(19:41 +0200)
committer
Jose Dapena Paz
<jdapena@igalia.com>
Sun, 31 May 2009 17:41:43 +0000
(19:41 +0200)
src/modest-init.c
patch
|
blob
|
history
diff --git
a/src/modest-init.c
b/src/modest-init.c
index
b412c33
..
a4394df
100644
(file)
--- a/
src/modest-init.c
+++ b/
src/modest-init.c
@@
-564,11
+564,27
@@
init_debug_g_type (void)
g_type_init_with_debug_flags (gflags);
}
g_type_init_with_debug_flags (gflags);
}
+static void
+null_log(const gchar* dom,
+ GLogLevelFlags l,
+ const gchar* m,
+ gpointer d)
+{
+ return;
+};
+
static void
init_debug_logging (void)
{
ModestRuntimeDebugFlags mflags;
mflags = modest_runtime_get_debug_flags ();
static void
init_debug_logging (void)
{
ModestRuntimeDebugFlags mflags;
mflags = modest_runtime_get_debug_flags ();
+
+#ifndef DEBUG
+ if (! (mflags & MODEST_RUNTIME_DEBUG_CODE)) {
+ g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, null_log, NULL);
+ }
+#endif
+
if (mflags & MODEST_RUNTIME_DEBUG_ABORT_ON_WARNING)
g_log_set_always_fatal (G_LOG_LEVEL_ERROR |
if (mflags & MODEST_RUNTIME_DEBUG_ABORT_ON_WARNING)
g_log_set_always_fatal (G_LOG_LEVEL_ERROR |