Commit bd516665 authored by 方开's avatar 方开 🍔
Browse files

只保留30个日志文件

parent d08e7556
......@@ -16,7 +16,7 @@ def measurelogging():
"%(asctime)s - %(module)s.%(funcName)s.%(lineno)d - %(levelname)s - %(message)s")
log_file_handler = TimedRotatingFileHandler(
filename=measurePath, when="D", interval=1, encoding="utf-8")
filename=measurePath, when="D", interval=1, encoding="utf-8",backupCount=30)
log_file_handler.setFormatter(formatter)
log_file_handler.setLevel(logging.DEBUG)
log.addHandler(log_file_handler)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment