Enable the collector's built-in async file logger (#1221) in the windows-monitor example: call EnableFileLogging before Start so a run also writes the NLog-parity DataCollector_<date>.txt (+ _error_) files alongside the stderr callback. Directory defaults to ./Logs, overridable via HSM_LOG_DIR.
Exercises the collector's built-in file sink (the aggregator's logging feature) in a runnable example — distinct from the HSM agent, which supplies its own file logger via SetLogger. Example-only, no library change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
Enable the collector's built-in file logger in the
windows-monitorexample:collector.EnableFileLogging(log_dir, LogLevel::Info)beforeStart().log_dirdefaults to./Logs, overridable via theHSM_LOG_DIRenv var.DataCollector_<date>.txt+DataCollector_error_<date>.txt).Why
#1221 added a built-in async file logger to the native collector for consumers that don't supply their own sink (e.g. the tt-aggregator native adapter). This wires it into the live
windows-monitorexample so the feature is demonstrated end-to-end in a runnable app — a run now streams to the server and writes the parity log files next to it.Example-only; no library/production change. Both sinks (the existing stderr callback + the file logger) receive every message.
🤖 Generated with Claude Code