This repository has been archived on 2025-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
Novel/utils/logger.py
2025-03-23 19:04:26 +01:00

19 lines
945 B
Python

from pystyle import Colors, Colorate
from datetime import datetime
import time
class Log:
@staticmethod
def s(text): # success
time_now = datetime.fromtimestamp(time.time()).strftime('%H:%M')
print(Colors.gray + time_now + " " + Colorate.Horizontal(Colors.green_to_cyan, "SUCCESS", 1) + Colors.gray + " > " + Colors.light_gray + text + Colors.reset)
@staticmethod
def e(text): # error
time_now = datetime.fromtimestamp(time.time()).strftime('%H:%M')
print(Colors.gray + time_now + " " + Colorate.Horizontal(Colors.red_to_purple, " ERROR ", 1) + Colors.gray + " > " + Colors.light_gray + text + Colors.reset)
@staticmethod
def v(data): # verbose
time_now = datetime.fromtimestamp(time.time()).strftime('%H:%M')
print(Colors.gray + time_now + " " + Colorate.Horizontal(Colors.blue_to_white, "VERBOSE", 1) + Colors.gray + " > " + Colors.light_gray + data + Colors.reset)