[geary/mcatanzaro/fatal-warnings: 50/50] util-logging: fix fatal warnings logic
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mcatanzaro/fatal-warnings: 50/50] util-logging: fix fatal warnings logic
- Date: Thu, 7 Jul 2022 22:09:57 +0000 (UTC)
commit c1cbd6e1116d8dea423b91e802e5c8d5eebaa911
Author: Michael Catanzaro <mcatanzaro redhat com>
Date: Wed Aug 25 10:23:26 2021 -0500
util-logging: fix fatal warnings logic
If fatal criticals are enabled, we should not crash on a simple warning,
because warnings are normal and less serious than criticals.
If fatal warnings are enabled, we should definitely crash on criticals,
because criticals indicate undefined behavior and are more serious than
warnings.
src/engine/util/util-logging.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/engine/util/util-logging.vala b/src/engine/util/util-logging.vala
index 97f9ab6a8..8f7895f92 100644
--- a/src/engine/util/util-logging.vala
+++ b/src/engine/util/util-logging.vala
@@ -78,9 +78,9 @@ namespace Geary.Logging {
var parts = debug_var.split(",");
if ("fatal-warnings" in parts) {
Logging.set_breakpoint_on |= GLib.LogLevelFlags.LEVEL_WARNING;
+ Logging.set_breakpoint_on |= GLib.LogLevelFlags.LEVEL_CRITICAL;
}
if ("fatal-criticals" in parts) {
- Logging.set_breakpoint_on |= GLib.LogLevelFlags.LEVEL_WARNING;
Logging.set_breakpoint_on |= GLib.LogLevelFlags.LEVEL_CRITICAL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]