fix bad filename on windows

This commit is contained in:
Corban-Lee Jones 2024-11-09 20:56:38 +00:00
parent 8d3b20e971
commit dcbb27ae2e

View File

@ -143,7 +143,8 @@ LOGGING_DIR.mkdir(exist_ok=True)
with open(LOGGING_DIR / "config.json", "r", encoding="utf-8") as file:
LOGGING = json.load(file)
LOGGING["handlers"]["file"]["filename"] = LOGGING_DIR / f"{timezone.now()}.log"
filename = timezone.now().strftime('%Y-%m-%d_%H-%M-%S')
LOGGING["handlers"]["file"]["filename"] = LOGGING_DIR / f"{filename}.log"
# Internationalization