-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.py
More file actions
36 lines (27 loc) · 745 Bytes
/
log.py
File metadata and controls
36 lines (27 loc) · 745 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
34
35
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import color
import sys
class Log():
@staticmethod
def _print(word):
sys.stdout.write(word)
sys.stdout.flush()
@staticmethod
def info(word):
Log._print("[+] %s\n" % color.lightPurple(word))
@staticmethod
def warning(word):
Log._print("[!] %s\n" % color.yellow(word))
@staticmethod
def error(word):
Log._print("[-] %s\n" % color.red(word))
@staticmethod
def success(word):
Log._print("[+] %s\n" % color.purple(word))
@staticmethod
def query(word):
Log._print("[?] %s\n" % color.underline(word))
@staticmethod
def context(context):
Log._print("%s" % (color.red(context)))