summaryrefslogtreecommitdiff
path: root/src/defaultsettings.cpp
diff options
context:
space:
mode:
authorHybridDog <ovvv@web.de>2019-09-07 19:38:54 +0200
committerSmallJoker <SmallJoker@users.noreply.github.com>2019-09-07 19:38:54 +0200
commit36bfc67574aaa54c3e7f814ec7c5336e9dbc1ac4 (patch)
treeec840ecfa24a1353b01cf5a477d111a7c8b8ea78 /src/defaultsettings.cpp
parent2c9edefde3d941b1efa5c93a087814d6bc3509e6 (diff)
downloadminetest-36bfc67574aaa54c3e7f814ec7c5336e9dbc1ac4.tar.gz
minetest-36bfc67574aaa54c3e7f814ec7c5336e9dbc1ac4.tar.bz2
minetest-36bfc67574aaa54c3e7f814ec7c5336e9dbc1ac4.zip
Move debug.txt after it grows too big (#8904)
Before opening the file for writing, its file size is tested. If it exceeds 50 MB, it is moved to debut.txt.1, otherwise the log is appended to the old messages. An old debut.txt.1 is removed if it already exists.
Diffstat (limited to 'src/defaultsettings.cpp')
-rw-r--r--src/defaultsettings.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 7756bc45d..0c51610c9 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -385,6 +385,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("ignore_world_load_errors", "false");
settings->setDefault("remote_media", "");
settings->setDefault("debug_log_level", "action");
+ settings->setDefault("debug_log_size_max", "50");
settings->setDefault("emergequeue_limit_total", "512");
settings->setDefault("emergequeue_limit_diskonly", "64");
settings->setDefault("emergequeue_limit_generate", "64");