Windows file names can't have colons in them.

This commit is contained in:
Alessandro Maggio
2021-01-14 19:04:50 +01:00
committed by GitHub
parent ba1ed316d9
commit bcd51f292b

View File

@@ -71,7 +71,7 @@ class TwitchChannelPointsMiner:
Path(logs_path).mkdir(parents=True, exist_ok=True)
self.logs_file = os.path.join(
logs_path,
f"{username}.{datetime.now().strftime('%d-%m-%Y-%H:%M:%S')}.log",
f"{username}.{datetime.now().strftime('%d%m%Y-%H%M%S')}.log",
)
file_handler = logging.FileHandler(self.logs_file)
file_handler.setFormatter(logging.Formatter("%(asctime)s - %(levelname)s - %(name)s - [%(funcName)s]: %(message)s"))