我在Python中使用日志记录模块,我希望它在我的应用程序每次启动时创建一个新的日志文件。应该轮换较旧的日志文件(例如:logfile.txt->logfile1.txt等)。我已经找到了:http://docs.python.org/library/logging.htmlBaseRotatingHandleristhebaseclassforhandlersthatrotatelogfilesatacertainpoint.Itisnotmeanttobeinstantiateddirectly.Instead,useRotatingFileHandlerorTimedRotati