diff --git a/conjurer_librarian/conjurer_librarian.py b/conjurer_librarian/conjurer_librarian.py index 1a322ab..9740009 100644 --- a/conjurer_librarian/conjurer_librarian.py +++ b/conjurer_librarian/conjurer_librarian.py @@ -1,3 +1,4 @@ +from logging import handlers import re import logging import threading @@ -313,6 +314,15 @@ async def get_partial(): #=======================================MAIN=================================================== if __name__ == "__main__": app.logger.setLevel(logging.DEBUG) + h1 = handlers.RotatingFileHandler( + filename="E:\\logs\\librarian.log", + encoding="utf-8", + mode="a", + maxBytes=6 * 1024 * 1024, + backupCount=6, + ) + + app.logger.addHandler(h1) threads = [] threads.append(threading.Thread(target=waitress_run)) #threads.append(threading.Thread(target=flask_debug))