Added log filehandler

This commit is contained in:
gpkvt 2022-10-02 02:27:48 +02:00
parent a5cd6ae86d
commit a21163f5e5
1 changed files with 7 additions and 0 deletions

7
tts.py
View File

@ -1619,6 +1619,13 @@ if __name__ == "__main__":
level=logging.DEBUG, level=logging.DEBUG,
format='%(asctime)s %(module)s %(threadName)s %(levelname)s: %(message)s' 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 sys.tracebacklimit = 3
VERSION = "1.7.1" VERSION = "1.7.1"