By default, do debug output iff at least one debug domain is enabled
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 2 Apr 2013 16:53:36 +0000 (17:53 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 3 Apr 2013 15:54:55 +0000 (16:54 +0100)
Previously, debug output (and expensive checks that are enabled alongside
debug output) was always enabled unless explicitly disabled, but
Philip noted that this was not intentional.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687161
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip@tecnocode.co.uk>
folks/debug.vala

index 11c5f9e..fb30f81 100644 (file)
@@ -89,7 +89,7 @@ public class Folks.Debug : Object
         }
     }
 
-  private bool _debug_output_enabled = true;
+  private bool _debug_output_enabled = false;
 
   /**
    * Whether debug output is enabled. This is orthogonal to the set of enabled
@@ -254,6 +254,7 @@ public class Folks.Debug : Object
             }
         }
 
+      retval.debug_output_enabled = (retval._all || !retval._domains.is_empty);
       retval.colour_enabled = colour_enabled;
 
       return retval;