functions: do not rotate logs at startup, it's useful to see old logs when users attach them

This commit is contained in:
alfrix 2022-11-03 23:44:17 -03:00
parent e0950247d2
commit 11dd95b939

View File

@ -159,8 +159,6 @@ def setup_logging(log_file, software_version):
stdout_hdlr.setFormatter(stdout_fmt) stdout_hdlr.setFormatter(stdout_fmt)
fh = listener = None fh = listener = None
try: try:
if os.path.exists(log_file):
os.replace(log_file, log_file + ".1")
fh = KlipperScreenLoggingHandler(software_version, log_file, maxBytes=8000000, backupCount=1) fh = KlipperScreenLoggingHandler(software_version, log_file, maxBytes=8000000, backupCount=1)
formatter = logging.Formatter('%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s') formatter = logging.Formatter('%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s')
fh.setFormatter(formatter) fh.setFormatter(formatter)