mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-02 17:08:38 +08:00
update common_log.py
This commit is contained in:
parent
2ee63cab58
commit
2e43b1d097
@ -13,7 +13,7 @@ class MyLogging():
|
|||||||
logFile = logPath + logName
|
logFile = logPath + logName
|
||||||
formatter = logging.Formatter('%(asctime)s %(levelname)s: %(message)s')
|
formatter = logging.Formatter('%(asctime)s %(levelname)s: %(message)s')
|
||||||
# handler
|
# handler
|
||||||
time_rotating_file_handler = handlers.TimedRotatingFileHandler(filename=logFile, when='D', encoding='utf-8')
|
time_rotating_file_handler = handlers.TimedRotatingFileHandler(filename=logFile, when="MIDNIGHT", interval=1, encoding='utf-8')
|
||||||
time_rotating_file_handler.setLevel(logging.DEBUG)
|
time_rotating_file_handler.setLevel(logging.DEBUG)
|
||||||
time_rotating_file_handler.setFormatter(formatter)
|
time_rotating_file_handler.setFormatter(formatter)
|
||||||
# config
|
# config
|
||||||
|
Loading…
Reference in New Issue
Block a user