Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个几乎每秒都会调用记录器的函数,但是,我只想在日志文件旋转前一小时记录信息。
利用logging.handlers.TimedRotatingFileHandler(filename, when='H', interval=1)
logging.handlers.TimedRotatingFileHandler(filename, when='H', interval=1)