-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Extend error logging on retry failure #4477
Conversation
Add the raw message content to retry failure messages, allowing a level of diagnosis as to which valve is the one that is failing.
@@ -275,7 +275,7 @@ public void checkPendingAcks() { | |||
logger.debug("Retransmitting packet " + qi.msg.msgCount + " attempt " + qi.retryCount); | |||
sendMessage(qi.msg, qi); | |||
} else { | |||
logger.error("Transmission of packet " + qi.msg.msgCount + " failed 3 times"); | |||
logger.error("Transmission of packet " + qi.msg.msgCount + " failed 3 times, message was " + qi.msg.msgType + " to address " + qi.msg.dstAddrStr + " => " + qi.msg.rawMsg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you switch to parameterized logging?
logger.error("Transmission of packet {} failed 3 times, message was {} to address {} => {}", qi.msg.msgCount, qi.msg.msgType, qi.msg.dstAddrStr, qi.msg.rawMsg);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that makes sense. Update done, but now I have no idea how to squash the commit. Is that a requirement on this project? Perhaps easier to make a new fork and a new PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contributors no longer have to squash commits in this repo, so you're all set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. I don't think it's going to fix my problem (refer https://community.openhab.org/t/maxcul-retry-logic-proposed-extension/9983/4), but it'll take me some way down the path of knowing what's going on.
Thanks @PaulL1! |
* master: (178 commits) Fix the generateDeviceId method. (openhab#4498) [modbus] Add support for int32_swap, uint32_swap and float32_swap data types (openhab#4251) Extend error logging on retry failure (openhab#4477) Changed timestamp of item insert from MySql server time to local Java… (openhab#4503) [mochadx10] Add binding to OH2 distro (openhab#4502) [mqtt] Add openhab-action-mqtt feature for OH2 install (openhab#4499) ZWave database update (openhab#4497) Fixes openhab#1003 (openhab#4162) [WeatherBinding] Add log messages for invalid configurations (openhab#4458) Network Health - Made log message more clear (openhab#4425) Update ZMNHSD (openhab#4490) Update clock command class and converter (openhab#4489) Updated modbus config template with serial example. Documented advanced connection parameters (openhab#4487) ZWave update WA105DBZ (openhab#4485) Zwave database 180616 (openhab#4483) Zwave database 180616 (openhab#4479) Add Aeon ZW112 - Door/Window Sensor 6 (openhab#4472) Include Aeon ZW112 - Door/Window Sensor 6 (openhab#4471) Z-Wave: Added support for CENTRAL_SCENE (openhab#4431) ZWave database update (openhab#4476) ... # Conflicts: # bundles/binding/org.openhab.binding.zwave/database/products.xml # bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/converter/ZWaveConverterHandler.java # bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveCommandClass.java
Add the raw message content to retry failure messages, allowing a level of diagnosis as to which valve is the one that is failing.