From 8667301c8755ace6b17aafcaefab1201eafcd1e4 Mon Sep 17 00:00:00 2001 From: Juice-XIJ Date: Thu, 22 Dec 2022 21:27:18 -0800 Subject: [PATCH] fix console log overflow issue (#51) --- logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logger.py b/logger.py index 28c9f66..c34aa91 100644 --- a/logger.py +++ b/logger.py @@ -28,7 +28,7 @@ def emit(self, record: logging.LogRecord): self.text.insert('end', msg + '\n', record.levelname) self.text.see('end') if self.num_lines() > self.line_check: - self.text.delete(1.0, self.line_check - self.line_limitation) + self.text.delete(1.0, float(min(2, self.line_check - self.line_limitation))) class Logger: