Using TimedRotatingFileHandler logging with a logging.config

后端 未结 1 1129
离开以前
离开以前 2021-02-14 22:22

I\'m trying to test using a TimedRotatingFileHandler with a logging.config file, nothing that complicated but it should roll over every 10 seconds into a new log file.

H

1条回答
  •  梦如初夏
    2021-02-14 22:30

    args=('./logs/log.out', 'when=\'S\'', 'interval=10', 'backupCount=5')
    

    Doesn't look right. Try this

    args=('./logs/log.out', when='S', interval=10, backupCount=5)
    

    Or possibly this

    args=('./logs/log.out','S',10,5)
    

    0 讨论(0)
提交回复
热议问题