os.makedirs("./debug/logs", exist_ok=True)
th_debug = handlers.TimedRotatingFileHandler(filename="./debug/" + filename, when='D', backupCount=3,
encoding='utf-8')
# th_debug.namer = namer
th_debug.suffix = "%Y-%m-%d.log"
th_debug.setFormatter(format_str)
th_debug.setLevel(logging.DEBUG)
log.addHandler(th_debug)
th = handlers.TimedRotatingFileHandler(filename=filename, when='D', backupCount=3, encoding='utf-8')
# th.namer = namer
th.suffix = "%Y-%m-%d.log"
th.setFormatter(format_str)
th.setLevel(logging.INFO)
log.addHandler(th)
log.setLevel(level)
return log
os.makedirs('./logs', exist_ok=True)
logger = _logging(filename='./logs/default')