40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
|
"""
|
||
|
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}")
|