feat: install the SolidSyslog error handler - #50
Conversation
|
@coderabbitai review |
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe example application adds a syslog error handler, registers it during startup, includes it in the CMake build, documents its behavior and cost, and updates the measurement report for the new ChangesSyslog error handler
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds and registers the SolidSyslog error handler and routes its messages to the existing console output; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant main
participant SyslogErrorHandler_Install
participant SolidSyslog_SetErrorHandler
participant SyslogErrorHandler
participant Console
main->>SyslogErrorHandler_Install: register global handler
SyslogErrorHandler_Install->>SolidSyslog_SetErrorHandler: set callback
SolidSyslog_SetErrorHandler-->>main: handler installed
SolidSyslog_SetErrorHandler->>SyslogErrorHandler: deliver runtime fault
SyslogErrorHandler->>Console: print formatted severity and category
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
✅ Action performedReview finished.
|
d492113 to
a9c48ed
Compare
|
@coderabbitai pause |
Nothing in the library fails loudly. A _Create that cannot succeed substitutes a Null object and reports it rather than returning NULL, so a logger that has silently stopped looks exactly like one with nothing to say. The handler is what tells them apart, and it goes in before the first _Create rather than after something looks wrong. Flash +404 B RAM +8 B The handler prints to the same console as everything else, so a fault lands in the run report next to the rest of what the device did. It names the four lifecycle categories a misconfigured integration raises and prints the rest numerically — a device reacting to those would switch on the category, not the text. It is more than an integration aid. The handler is the seam into the device's own error and health reporting, and later stages use it at run time: an edge-triggered warning when the collector becomes unreachable, a notice when delivery recovers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0b1af20 to
c481c5c
Compare
✅ Action performedReviews paused. |
Install the handler before any other call into SolidSyslog.
Nothing in the library fails loudly. A
_Createthat cannot succeed substitutes a Null object andreports it rather than returning
NULL, so a logger that has silently stopped looks exactly likeone with nothing to say. The handler is what tells the two apart, which is why it goes in before
the first
_Createand not after something looks wrong. It reports many misconfiguration errors,and can save significant time while integrating.
This is not only an integration aid. The handler is the seam into the device's own error and health
reporting, and it stays valuable at run time: later stages raise an edge-triggered warning when the
collector becomes unreachable and a notice when delivery recovers. Route it wherever the device
already routes faults — here, the same console as everything else, so a fault lands in the run
report next to the rest of what the device did.
The handler names the four lifecycle categories a misconfigured integration raises and prints the
rest numerically. A device reacting to a fault would switch on the category rather than the text,
so the names are for the reader.
Summary by CodeRabbit
New Features
Documentation
Tests