From 11dd95b939145ae749ba3f6895c8dd497c242378 Mon Sep 17 00:00:00 2001 From: alfrix Date: Thu, 3 Nov 2022 23:44:17 -0300 Subject: [PATCH] functions: do not rotate logs at startup, it's useful to see old logs when users attach them --- ks_includes/functions.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ks_includes/functions.py b/ks_includes/functions.py index bfe22539..8ae22781 100644 --- a/ks_includes/functions.py +++ b/ks_includes/functions.py @@ -159,8 +159,6 @@ def setup_logging(log_file, software_version): stdout_hdlr.setFormatter(stdout_fmt) fh = listener = None try: - if os.path.exists(log_file): - os.replace(log_file, log_file + ".1") fh = KlipperScreenLoggingHandler(software_version, log_file, maxBytes=8000000, backupCount=1) formatter = logging.Formatter('%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s') fh.setFormatter(formatter)