-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathLog.py
More file actions
33 lines (25 loc) · 699 Bytes
/
Log.py
File metadata and controls
33 lines (25 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Import Modules
from click import style
from helper import *
from datetime import datetime
# Style class
N = '\033[0m'
W = '\033[1;37m'
B = '\033[1;34m'
M = '\033[1;35m'
R = '\033[1;31m'
G = '\033[1;32m'
Y = '\033[1;33m'
C = '\033[1;36m'
class Log:
@classmethod
def info(self,text):
print("["+Y+datetime.now().strftime("%H:%M:%S")+N+"] ["+G+"INFO"+N+"] "+text)
@classmethod
def warning(self,text):
print("["+Y+datetime.now().strftime("%H:%M:%S")+N+"] ["+Y+"WARNING"+N+"] "+text)
@classmethod
def high(self,text):
print("["+Y+datetime.now().strftime("%H:%M:%S")+N+"] ["+R+"CRITICAL"+N+"] "+text)