How to delete old logs at a Python script start when use TimedRotatingFileHandler

前端 未结 0 1944
执念已碎
执念已碎 2020-12-29 10:15

Here is the code snippet

    # file handler
    hdlr = logging.handlers.TimedRotatingFileHandler(os.path.join(log_dir, log_fn), "midnight", backupCo         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题