Add a small logging integration API with diagnostic context
Author: pardeikeCreated Sep 8, 2026Updated Sep 8, 2026
Labelsenhancement
Enhancement for the Harmony 3 backlog.
Hosts can redirect FileLog through a StreamWriter, but integrating Harmony diagnostics with an application's logger still requires parsing text and adapting file-oriented behavior.
Provide an optional logging callback or equivalent small API with severity, message and available context such as the target method, patch owner and exception. Choose its exact shape during implementation.
Completion criteria:
- Preserve existing FileLog APIs, debug controls and environment-variable behavior.
- Define filtering, subscription lifetime, thread safety, reentrancy and the behavior of a throwing consumer.
- Avoid constructing expensive diagnostic payloads when nobody requests them. Ordinary patched calls must not acquire logging overhead by default.
- Provide a small host-integration example without requiring a particular logging framework.
- Verify meaningful enabled/disabled and failure cases on supported runtimes.
Successful patch lifecycle notifications and per-call profiling are separate questions; this ticket covers diagnostic delivery.
Follow-up to #586. Current FileLog.
Source: pardeike/Harmony