From 25c5d642b3264b4061158d8cfac3ce278c229ee1 Mon Sep 17 00:00:00 2001 From: Lyncoln Date: Wed, 28 Oct 2026 16:46:48 -0400 Subject: [PATCH] Added logging and stopped output return with buildFirewall --- core/server/createlistener.py | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/core/server/createlistener.py b/core/server/createlistener.py index 0acde01..f17ab66 100644 --- a/core/server/createlistener.py +++ b/core/server/createlistener.py @@ -1,10 +1,10 @@ import json +import logging + from core.runtime.outputs import buildOutput -from core.runtime.applyconditions import applyConditions -from core.execution.operation import buildOperation from core.execution.executioncontract import executeContract from core.runtime.firewall import buildFirewall -from core.execution.createthread import buildThread + def buildListener(listener, self): @@ -18,7 +18,7 @@ def buildListener(listener, self): if self.path.startswith(listener.acceptpath): #Prints can used buildlog for listener runtime - print("Matrix transaction received") + logging.info("Matrix transaction received") content_length = int(self.headers["Content-Length"]) @@ -27,27 +27,15 @@ def buildListener(listener, self): outputs = {} - outputs = buildOutput(data, listener, outputs) - - #for item in outputs[listener.recursive["source"]]: - - #match, filter = applyConditions(listener, item, outputs) - - #if not match: - # if "com.loxthelion.rmass_message_id" in item.get("content", {}): - # print("Excluding previously imported items") - # #print(item) - # continue - - allow, item, status_code = buildFirewall(listener, outputs) + buildOutput(data, listener, outputs) + allow, status_code = buildFirewall(listener, outputs) if allow: #Print allowed items for logging purposes - print(outputs["firewall_allowed"]) + logging.info(outputs["firewall_allowed"]) #Process and forward to RMASS - #thread, lifecycles = buildThread(listener.execute, lifecycles) outputs, responses = executeContract(listener.execute, outputs, None)