From b10aec1020d402dbf7822aa6873aac34c2335f3b Mon Sep 17 00:00:00 2001 From: esk4nz Date: Mon, 23 Mar 2026 22:57:15 +0200 Subject: [PATCH] SCRUM-80 Changed print to logging in agent main --- agent/src/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/src/main.py b/agent/src/main.py index 65380af..db81260 100644 --- a/agent/src/main.py +++ b/agent/src/main.py @@ -1,6 +1,7 @@ from paho.mqtt import client as mqtt_client from schema.aggregated_data_schema import AggregatedDataSchema from file_datasource import FileDatasource +import logging import config @@ -28,7 +29,7 @@ def publish(client, topic, datasource): data = datasource.read() msg = AggregatedDataSchema().dumps(data) result = client.publish(topic, msg) - print(f"Published to {topic}: {msg[:50]}...") + logging.info(f"Published to {topic}: {msg[:50]}...") status = result[0] if status != 0: print(f"Failed to send message to topic {topic}")