Implement another level of logging for tracing
This commit is contained in:
parent
9e6dd5e03d
commit
b67eee42c1
|
@ -17,6 +17,7 @@
|
||||||
"ConnectOnCreate": false,
|
"ConnectOnCreate": false,
|
||||||
"AutoReg": false,
|
"AutoReg": false,
|
||||||
"Debug": false,
|
"Debug": false,
|
||||||
|
"Trace", false,
|
||||||
"Relay": {
|
"Relay": {
|
||||||
"Host": "127.0.0.1",
|
"Host": "127.0.0.1",
|
||||||
"Port": "201x",
|
"Port": "201x",
|
||||||
|
|
|
@ -17,6 +17,8 @@ from utils.cleanup import handler
|
||||||
signal(SIGINT, handler) # Handle Ctrl-C and run the cleanup routine
|
signal(SIGINT, handler) # Handle Ctrl-C and run the cleanup routine
|
||||||
if "--debug" in sys.argv: # yes really
|
if "--debug" in sys.argv: # yes really
|
||||||
main.config["Debug"] = True
|
main.config["Debug"] = True
|
||||||
|
if "--trace" in sys.argv:
|
||||||
|
main.config["Trace"] = True
|
||||||
from utils.logging.log import *
|
from utils.logging.log import *
|
||||||
from utils.loaders.command_loader import loadCommands
|
from utils.loaders.command_loader import loadCommands
|
||||||
from core.server import Server, ServerFactory
|
from core.server import Server, ServerFactory
|
||||||
|
|
|
@ -5,3 +5,6 @@ def debug(*data):
|
||||||
if main.config["Debug"]:
|
if main.config["Debug"]:
|
||||||
print("[DEBUG]", *data)
|
print("[DEBUG]", *data)
|
||||||
|
|
||||||
|
def trace(*data):
|
||||||
|
if main.config["Trace"]:
|
||||||
|
print("[TRACE]", *data)
|
||||||
|
|
Loading…
Reference in New Issue