fix(driver-twincat): resolve Medium code-review finding (Driver.TwinCAT-005)
Inject optional ILogger<TwinCATDriver> (NullLogger default) and log connect success/failure, ADS read errors, symbol-browse fallback, native-notification registration failures, and host-state transitions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -134,7 +134,7 @@ date/time semantics are intended to be exposed properly, track a follow-up to de
|
||||
| Severity | Medium |
|
||||
| Category | OtOpcUa conventions |
|
||||
| Location | `TwinCATDriver.cs` (whole file), `AdsTwinCATClient.cs` (whole file) |
|
||||
| Status | Open |
|
||||
| Status | Resolved |
|
||||
|
||||
**Description:** The driver performs no logging. `CLAUDE.md` Library Preferences mandate
|
||||
Serilog with a rolling daily file sink. Connect failures, ADS error codes, symbol-browse
|
||||
@@ -147,7 +147,7 @@ success/failure per device, ADS errors with code, symbol-browse fallback (the `D
|
||||
catch), native-notification registration failures, and host state transitions
|
||||
(`TransitionDeviceState`).
|
||||
|
||||
**Resolution:** _(open)_
|
||||
**Resolution:** Resolved 2026-05-22 — added optional `ILogger<TwinCATDriver>` constructor parameter (defaults to `NullLogger`); logs connect success/failure in `EnsureConnectedAsync`, ADS read errors in `ReadAsync`, symbol-browse fallback in `DiscoverAsync`, notification-registration failures in `SubscribeAsync`, and host-state transitions in `TransitionDeviceState`.
|
||||
|
||||
### Driver.TwinCAT-006
|
||||
|
||||
|
||||
Reference in New Issue
Block a user