Separate out the logging functions
This commit is contained in:
parent
5d5b5d4d47
commit
4b3541625a
15
threshold
15
threshold
|
@ -13,6 +13,8 @@ from json import load, dump, loads
|
||||||
from sys import exit
|
from sys import exit
|
||||||
from subprocess import run, PIPE
|
from subprocess import run, PIPE
|
||||||
|
|
||||||
|
from utils.logging.log import *
|
||||||
|
|
||||||
numbers = "0123456789"
|
numbers = "0123456789"
|
||||||
|
|
||||||
listener = None
|
listener = None
|
||||||
|
@ -34,19 +36,6 @@ filemap = {
|
||||||
"wholist": ["wholist.json", "WHO lists"],
|
"wholist": ["wholist.json", "WHO lists"],
|
||||||
}
|
}
|
||||||
|
|
||||||
def log(data):
|
|
||||||
print("[LOG]", data)
|
|
||||||
|
|
||||||
def debug(data):
|
|
||||||
print("[DEBUG]", data)
|
|
||||||
|
|
||||||
def warn(data):
|
|
||||||
print("[WARNING]", data)
|
|
||||||
|
|
||||||
def error(data):
|
|
||||||
print("[ERROR]", data)
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
def sendData(addr, data):
|
def sendData(addr, data):
|
||||||
connections[addr].send(data)
|
connections[addr].send(data)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
def log(data):
|
||||||
|
print("[LOG]", data)
|
||||||
|
|
||||||
|
def debug(data):
|
||||||
|
print("[DEBUG]", data)
|
||||||
|
|
||||||
|
def warn(data):
|
||||||
|
print("[WARNING]", data)
|
||||||
|
|
||||||
|
def error(data):
|
||||||
|
print("[ERROR]", data)
|
||||||
|
exit(1)
|
Loading…
Reference in New Issue