this should work. added some icons and some more

This commit is contained in:
2025-09-23 09:57:44 +02:00
parent b668eb3d77
commit 32fc4dc119
14 changed files with 290 additions and 185 deletions

View File

@@ -1,9 +1,34 @@
import time
import colorama
colorama.init(autoreset=True)
class Logger:
def log_error(self, message: str) -> None:
print(f"ERROR: {message}")
def log_info(self, message: str) -> None:
print(f"INFO: {message}")
def log_debug(self, message: str) -> None:
print(f"DEBUG: {message}")
def log_warning(self, message: str) -> None:
print(f"WARNING: {message}")
@staticmethod
def log_error(message: str) -> None:
now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
print(f"{colorama.Fore.RED}[ ERROR@{now} ]: {message}{colorama.Style.RESET_ALL}")
@staticmethod
def log_info(message: str) -> None:
now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
print(f"{colorama.Fore.CYAN}[ INFO@{now} ]: {message}{colorama.Style.RESET_ALL}")
@staticmethod
def log_debug(message: str) -> None:
now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
print(f"[ DEBUG@{now} ]: {message}")
@staticmethod
def log_warning(message: str) -> None:
now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
print(f"{colorama.Fore.YELLOW}[ WARNING@{now} ]: {message}{colorama.Style.RESET_ALL}")
# yes we seriously needed this
@staticmethod
def log_obfuscation_info(message: str ,isenabled: bool) -> None:
now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
if isenabled:
print(f"[ INFO@{now} ]: {colorama.Fore.GREEN}{message}{colorama.Style.RESET_ALL}")
else:
print(f"[ INFO@{now} ]: {colorama.Fore.RED}{message}{colorama.Style.RESET_ALL}")