forked from ram1123/HHWWyy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnnlogger.py
66 lines (60 loc) · 1.72 KB
/
dnnlogger.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# -*- coding: utf-8 -*-
# @Author: Ram Krishna Sharma
# @Date: 2021-04-05 20:57:39
# @Last Modified by: Ram Krishna Sharma
# @Last Modified time: 2021-04-05 20:58:06
class colors:
class foreground:
# Foreground
WHITE = '\033[37m'
CYAN = '\033[36m'
MAGENTA = '\033[35m'
BLUE = '\033[34m'
YELLOW = '\033[33m'
GREEN = '\033[32m'
RED = '\033[31m'
BLACK = '\033[30m'
END = '\033[39m'
pass
class background:
# Background
WHITE = '\033[47m'
CYAN = '\033[46m'
MAGENTA = '\033[45m'
BLUE = '\033[44m'
YELLOW = '\033[43m'
GREEN = '\033[42m'
RED = '\033[41m'
BLACK = '\033[40m'
END = '\033[49m'
pass
WHITE = '\033[97m'
CYAN = '\033[96m'
MAGENTA = '\033[95m'
BLUE = '\033[94m'
YELLOW = '\033[93m'
GREEN = '\033[92m'
RED = '\033[91m'
BLACK = '\033[90m'
END = '\033[99m'
# styles
class style:
DIM = '\033[2m'
BRIGHT = '\033[1m'
NORMAL = '\033[22m'
UNDERLINE = '\033[4m'
pass
# resets
ENDC = '\033[0m'
# log levels
colorlevels = {
"FATAL" :"%s%s%s"%(background.RED,style.BRIGHT,YELLOW),
"CRITICAL":"%s%s%s"%(background.RED,style.BRIGHT,YELLOW),
"ERROR" :"%s%s"%(style.BRIGHT,RED),
"WARNING" :"%s%s"%(style.BRIGHT,YELLOW),
"WARN" :"%s%s"%(style.BRIGHT,YELLOW),
"INFO" :"%s%s"%(style.BRIGHT,GREEN),
"DEBUG" :"%s%s"%(style.BRIGHT,MAGENTA),
"NOTSET" :ENDC
}
pass