diag: add verbose network listener logging to trace command delivery
Manager logs: listener start, every modem_message received, channel match/mismatch, command acceptance count, handler result. Client logs: every sendToMaster call with type and commandId.
This commit is contained in:
@@ -105,10 +105,14 @@ end
|
||||
-------------------------------------------------
|
||||
|
||||
local function sendToMaster(message)
|
||||
if not networkModem then return end
|
||||
if not networkModem then
|
||||
log.warn("NET", "sendToMaster: no modem, dropping %s", tostring(message.type))
|
||||
return
|
||||
end
|
||||
if not message.commandId then
|
||||
message.commandId = newCommandId()
|
||||
end
|
||||
log.info("NET", "TX -> ch %d: type=%s cmdId=%s", ORDER_CHANNEL, tostring(message.type), tostring(message.commandId))
|
||||
networkModem.transmit(ORDER_CHANNEL, CLIENT_CHANNEL, message)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user