From b412fed54708ef2e5b9e73dd0940d21d5f25c82c Mon Sep 17 00:00:00 2001 From: Chris Bloomfield <43499897+ithinkandicode@users.noreply.github.com> Date: Wed, 8 Feb 2023 09:59:36 +0000 Subject: [PATCH] fixes `log_fatal` to add the missing log to file Previously this func would not log to the file, which means it wouldn't show in the godot.log during mod development. Note: Unlike the `"error"` condition, I've only used `push_error` instead of also using `printerr`, because `push_error` also seems to print the error already (incl. the `ERROR: ` prefix, which `printerr` doesn't include) --- addons/mod_loader/mod_loader_utils.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mod_loader/mod_loader_utils.gd b/addons/mod_loader/mod_loader_utils.gd index f1725670..35556370 100644 --- a/addons/mod_loader/mod_loader_utils.gd +++ b/addons/mod_loader/mod_loader_utils.gd @@ -65,6 +65,7 @@ static func _loader_log(message: String, mod_name: String, log_type: String = "i match log_type.to_lower(): "fatal-error": + push_error(message) _write_to_log_file(log_message) _write_to_log_file(JSON.print(get_stack(), " ")) assert(false, message)