Using TimedRotatingFileHandler logging with a logging.config

后端 未结 1 939
醉酒成梦
醉酒成梦 2021-02-14 22:10

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:44
    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)
提交回复
热议问题