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.
This commit is contained in:
HybridDog
2019-09-07 19:38:54 +02:00
committed by SmallJoker
parent 2c9edefde3
commit 36bfc67574
5 changed files with 33 additions and 11 deletions

View File

@@ -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