19 lines
945 B
Python
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)
|