diff --git a/conf/example/config.json b/conf/example/config.json index a3dfecc..348af88 100644 --- a/conf/example/config.json +++ b/conf/example/config.json @@ -17,6 +17,7 @@ "ConnectOnCreate": false, "AutoReg": false, "Debug": false, + "Trace", false, "Relay": { "Host": "127.0.0.1", "Port": "201x", diff --git a/threshold b/threshold index 9425e60..59e9fab 100755 --- a/threshold +++ b/threshold @@ -17,6 +17,8 @@ from utils.cleanup import handler signal(SIGINT, handler) # Handle Ctrl-C and run the cleanup routine if "--debug" in sys.argv: # yes really main.config["Debug"] = True +if "--trace" in sys.argv: + main.config["Trace"] = True from utils.logging.log import * from utils.loaders.command_loader import loadCommands from core.server import Server, ServerFactory diff --git a/utils/logging/debug.py b/utils/logging/debug.py index 4b05602..4b8c708 100644 --- a/utils/logging/debug.py +++ b/utils/logging/debug.py @@ -5,3 +5,6 @@ def debug(*data): if main.config["Debug"]: print("[DEBUG]", *data) +def trace(*data): + if main.config["Trace"]: + print("[TRACE]", *data)