From 36bfc67574aaa54c3e7f814ec7c5336e9dbc1ac4 Mon Sep 17 00:00:00 2001 From: HybridDog Date: Sat, 7 Sep 2019 19:38:54 +0200 Subject: 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. --- builtin/settingtypes.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'builtin') 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 -- cgit v1.2.3