1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Logger: Cache 'flush_stdout_on_print' to improve performance, and works before ProjectSettings starts.

ProjectSetting: Now 'application/run/flush_stdout_on_print' requires a restart of the Editor to take effect

(cherry picked from commit 89283b7b53)
This commit is contained in:
Mateo Kuruk Miccino
2021-02-28 19:26:14 -03:00
committed by Rémi Verschelde
parent 279b9f43f3
commit 04fefed904
4 changed files with 18 additions and 4 deletions

View File

@@ -980,8 +980,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// Only flush stdout in debug builds by default, as spamming `print()` will
// decrease performance if this is enabled.
GLOBAL_DEF("application/run/flush_stdout_on_print", false);
GLOBAL_DEF("application/run/flush_stdout_on_print.debug", true);
GLOBAL_DEF_RST("application/run/flush_stdout_on_print", false);
GLOBAL_DEF_RST("application/run/flush_stdout_on_print.debug", true);
GLOBAL_DEF("logging/file_logging/enable_file_logging", false);
// Only file logging by default on desktop platforms as logs can't be
@@ -1029,6 +1029,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if (quiet_stdout)
_print_line_enabled = false;
Logger::set_flush_stdout_on_print(ProjectSettings::get_singleton()->get("application/run/flush_stdout_on_print"));
OS::get_singleton()->set_cmdline(execpath, main_args);
GLOBAL_DEF("rendering/quality/driver/driver_name", "GLES3");