From a21163f5e53f15cb8cde26060fc886816005faf1 Mon Sep 17 00:00:00 2001 From: gpkvt Date: Sun, 2 Oct 2022 02:27:48 +0200 Subject: [PATCH] Added log filehandler --- tts.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tts.py b/tts.py index b4f0ab7..e8175e9 100644 --- a/tts.py +++ b/tts.py @@ -1619,6 +1619,13 @@ if __name__ == "__main__": level=logging.DEBUG, format='%(asctime)s %(module)s %(threadName)s %(levelname)s: %(message)s' ) + + file_handler = logging.FileHandler('tts.log') + file_handler.setLevel(logging.ERROR) + file_handler.setFormatter(formatter) + + logger.addHandler(file_handler) + sys.tracebacklimit = 3 VERSION = "1.7.1"