Sharing @deglan comment for the visibility:
logger.add("file_{time}.log", mode="w")
The mode is the mode in which you will open the file.
You can learn more about the mode here: