summaryrefslogtreecommitdiff
path: root/builtin
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 /builtin
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 'builtin')
-rw-r--r--builtin/settingtypes.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt
index 4254603e2..eefd3490c 100644
--- a/builtin/settingtypes.txt
+++ b/builtin/settingtypes.txt
@@ -1319,6 +1319,12 @@ language (Language) enum ,be,ca,cs,da,de,dv,en,eo,es,et,fr,he,hu,id,it,ja,jbo,
# - verbose
debug_log_level (Debug log level) enum action ,none,error,warning,action,info,verbose
+# If the file size of debug.txt exceeds the number of megabytes specified in
+# this setting when it is opened, the file is moved to debug.txt.1,
+# deleting an older debug.txt.1 if it exists.
+# debug.txt is only moved if this setting is positive.
+debug_log_size_max (Debug log file size threshold) int 50
+
# IPv6 support.
enable_ipv6 (IPv6) bool true