discord-vk-pythonbot/aprint/aprint.py

40 lines
1.2 KiB
Python
Raw Normal View History

2024-05-13 13:02:44 +00:00
"""
Advanced Print Logging by thehatkid
GitHub: https://github.com/thehatkid
"""
from colorama import init, Fore
import datetime
init()
def info(text):
print(f"{Fore.LIGHTBLACK_EX}[{datetime.datetime.now().strftime('%d.%m.%Y %H:%M:%S.%f')}]"
f"{Fore.LIGHTCYAN_EX}[Info]{Fore.RESET} {text}{Fore.RESET}")
def notice(text):
print(f"{Fore.LIGHTBLACK_EX}[{datetime.datetime.now().strftime('%d.%m.%Y %H:%M:%S.%f')}]"
f"{Fore.LIGHTBLUE_EX}[Notice]{Fore.RESET} {text}{Fore.RESET}")
def warn(text):
print(f"{Fore.LIGHTBLACK_EX}[{datetime.datetime.now().strftime('%d.%m.%Y %H:%M:%S.%f')}]"
f"{Fore.YELLOW}[Warning] {text}{Fore.RESET}")
def error(text):
print(f"{Fore.LIGHTBLACK_EX}[{datetime.datetime.now().strftime('%d.%m.%Y %H:%M:%S.%f')}]"
f"{Fore.LIGHTRED_EX}[Error] {text}{Fore.RESET}")
def debug(text):
print(f"{Fore.LIGHTBLACK_EX}[{datetime.datetime.now().strftime('%d.%m.%Y %H:%M:%S.%f')}]"
f"{Fore.LIGHTMAGENTA_EX}[Debug] {text}{Fore.RESET}")
def none(text):
print(f"{Fore.LIGHTBLACK_EX}[{datetime.datetime.now().strftime('%d.%m.%Y %H:%M:%S.%f')}]"
f"{Fore.RESET} {text}{Fore.RESET}")