Fixed bug in the logging method

This commit is contained in:
BlueFox 2024-11-16 15:08:18 +01:00
parent c7a8cda7d1
commit ddde9480ff
Signed by: BlueFox
GPG Key ID: 327233DA85435270

View File

@ -131,5 +131,5 @@ def log(log_level: int, message: str):
if log_level not in [0, 1, 2]: if log_level not in [0, 1, 2]:
print(f"[LOGGER] Got a message of unknown log level ({log_level}). Original message is printed below.") print(f"[LOGGER] Got a message of unknown log level ({log_level}). Original message is printed below.")
print(f"{message}") print(f"{message}")
elif cfg.LOG_LEVEL >= log_level: # if log level is valid elif Config().LOG_LEVEL >= log_level: # if log level is valid
print(f"[{log_mapping[log_level]}] {message}") print(f"[{log_mapping[log_level]}] {message}")