Skip to content

Commit cbe1d08

Browse files
committed
adjust logging
1 parent 79fb415 commit cbe1d08

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/cync_lan/devices.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -546,15 +546,11 @@ async def send_command(self, op: int, cmd_: int, sub_id: int, payload: bytes, m_
546546
f" not writing data >>> \n\n{full_packet.hex(" ")}")
547547
else:
548548
tasks.append(bridge_device.write(full_packet))
549-
# str_appnd = "..."
550-
str_appnd = (f' state to device ({bridge_device.ip_address}[{bridge_device.node_id}|queue_id: {bridge_device.queue_id.hex(" ")}]):\n'
551-
f'HEX: {full_packet.hex(" ")}\n'
552-
f'INT: {bytes2list(full_packet)}\n')
553549
if CYNC_RAW:
554550
str_appnd = (f' state to device ({bridge_device.ip_address}[{bridge_device.node_id}|queue_id: {bridge_device.queue_id.hex(" ")}):\n'
555551
f'HEX: {full_packet.hex(" ")}\n'
556552
f'INT: {bytes2list(full_packet)}\n')
557-
logger.debug(f"{lp} Sending{str_appnd}")
553+
logger.debug(f"{lp} Sending{str_appnd}")
558554

559555
if tasks:
560556
await asyncio.gather(*tasks)
@@ -1451,7 +1447,7 @@ async def _handle_73_mesh_control(
14511447
await msg.callback()
14521448
else:
14531449
await msg.callback
1454-
logger.debug(f"{lp} Received a command success reply: {msg}")
1450+
# logger.debug(f"{lp} Received a command success reply: {msg}")
14551451
elif success and not msg:
14561452
logger.debug(
14571453
f"{lp} CONTROL packet ACK callback NOT found for msg ID: {ctrl_msg_id}"

src/cync_lan/mqtt_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ async def start_receiver_task(self):
233233
tasks = []
234234
node = None
235235
sub_id: Optional[int] = None
236-
logger.debug(f"{lp} RECEIVED MQTT TOPIC: {topic} // MESSAGE: {payload}")
236+
logger.debug(f"{lp} RECEIVED MQTT TOPIC: {topic} // MESSAGE: {payload}") if MQTT_DEBUG is True else None
237237
if _topic[0] == CYNC_TOPIC:
238238
if _topic[1] == "set":
239239
# TOPIC: cync_lan_TEST/set/769962427-46/mitm // MESSAGE: b'ON'

0 commit comments

Comments
 (0)