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.
This commit is contained in:
parent
4f6375915e
commit
c1cbd6e111
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue