file_handler = logging.FileHandler(f"./logs/{logger_name}.log",mode='w')
或者
logging.basicConfig(filemode='w')