summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-07-10 11:02:57 +0200
committerGitHub <noreply@github.com>2020-07-10 11:02:57 +0200
commitaeccd1e287237db3ad6fcf81535b5260857b79cd (patch)
tree0c84cf9a0c924b86c8f9dcd7c4961774f70593b6 /main
parentf67b65864f318dd066e34388e936fcaf33cf448f (diff)
parent20af28ec0651da256e2c9ccefc868ea028c73a4a (diff)
Merge pull request #40121 from Calinou/enable-file-logging
Enable file logging by default on desktops to help with troubleshooting
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 7492d3d6c9..4fbbc21f41 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -955,8 +955,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#endif
GLOBAL_DEF("logging/file_logging/enable_file_logging", false);
- GLOBAL_DEF("logging/file_logging/log_path", "user://logs/log.txt");
- GLOBAL_DEF("logging/file_logging/max_log_files", 10);
+ // Only file logging by default on desktop platforms as logs can't be
+ // accessed easily on mobile/Web platforms (if at all).
+ // This also prevents logs from being created for the editor instance, as feature tags
+ // are disabled while in the editor (even if they should logically apply).
+ GLOBAL_DEF("logging/file_logging/enable_file_logging.pc", true);
+ GLOBAL_DEF("logging/file_logging/log_path", "user://logs/godot.log");
+ GLOBAL_DEF("logging/file_logging/max_log_files", 5);
ProjectSettings::get_singleton()->set_custom_property_info("logging/file_logging/max_log_files", PropertyInfo(Variant::INT, "logging/file_logging/max_log_files", PROPERTY_HINT_RANGE, "0,20,1,or_greater")); //no negative numbers
if (FileAccess::get_create_func(FileAccess::ACCESS_USERDATA) && GLOBAL_GET("logging/file_logging/enable_file_logging")) {
String base_path = GLOBAL_GET("logging/file_logging/log_path");