Remove commented logging statements in ISO8583Processor and ISO8583Sender for cleaner code

Co-authored-by: Copilot <copilot@github.com>
1 parent 6dcd0e02
...@@ -49,7 +49,7 @@ class ISO8583Processor: ...@@ -49,7 +49,7 @@ class ISO8583Processor:
bit39 = '00' bit39 = '00'
mti = iso.getMTI() if iso.getMTI() else '0000' mti = iso.getMTI() if iso.getMTI() else '0000'
log.info(f"MTI detected: {mti}") # log.info(f"MTI detected: {mti}")
response = b'' response = b''
invoice_id = "" invoice_id = ""
if mti == '0800': if mti == '0800':
...@@ -112,7 +112,7 @@ class ISO8583Processor: ...@@ -112,7 +112,7 @@ class ISO8583Processor:
bit39 = '76' bit39 = '76'
elif mti in ('0400', '0420'): elif mti in ('0400', '0420'):
logging.info(f"Handling reversal MTI: {mti}") # logging.info(f"Handling reversal MTI: {mti}")
response = b'RESP:0400/0420' # Add bit 7, 4, 62, 39 as needed response = b'RESP:0400/0420' # Add bit 7, 4, 62, 39 as needed
else: else:
logging.error(f"Unknown MTI: {mti}") logging.error(f"Unknown MTI: {mti}")
...@@ -121,8 +121,8 @@ class ISO8583Processor: ...@@ -121,8 +121,8 @@ class ISO8583Processor:
iso.setBit(7, self.get_bit7()) iso.setBit(7, self.get_bit7())
iso.setBit(39, bit39) iso.setBit(39, bit39)
response = iso.getRawIso() response = iso.getRawIso()
log.info( # log.info(
f"[WRITE] Prepared response for {filename}, data: {response.hex() if isinstance(response, bytes) else response}") # f"[WRITE] Prepared response for {filename}, data: {response.hex() if isinstance(response, bytes) else response}")
end_time = time.time() end_time = time.time()
elapsed = end_time - start_time elapsed = end_time - start_time
log.info( log.info(
......
...@@ -8,7 +8,7 @@ class ISO8583Sender: ...@@ -8,7 +8,7 @@ class ISO8583Sender:
def start(self): def start(self):
count = 0 count = 0
print(f"[SENDER INIT] mpp_connections type: {type(self.mpp_connections)}, value: {self.mpp_connections}") # print(f"[SENDER INIT] mpp_connections type: {type(self.mpp_connections)}, value: {self.mpp_connections}")
if self.mpp_connections is None: if self.mpp_connections is None:
raise RuntimeError("mpp_connections is None in sender process. Ensure init_mpp() is called in main process before starting sender.") raise RuntimeError("mpp_connections is None in sender process. Ensure init_mpp() is called in main process before starting sender.")
while True: while True:
...@@ -17,8 +17,8 @@ class ISO8583Sender: ...@@ -17,8 +17,8 @@ class ISO8583Sender:
conn_name = filename.rsplit('_', 3)[0] conn_name = filename.rsplit('_', 3)[0]
with self.sender_lock: with self.sender_lock:
count += 1 count += 1
print(f"[SENDER DEBUG] Got from queue: filename={filename}") # print(f"[SENDER DEBUG] Got from queue: filename={filename}")
print(f"[SENDER] mpp_connections keys: {list(self.mpp_connections.keys())}") # print(f"[SENDER] mpp_connections keys: {list(self.mpp_connections.keys())}")
item = self.mpp_connections.get(conn_name) item = self.mpp_connections.get(conn_name)
if not item or not item.get("running", False): if not item or not item.get("running", False):
# print(f"[SENDER] No connection for {conn_name}, skipping.") # print(f"[SENDER] No connection for {conn_name}, skipping.")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!