refactor(historian): align ServerHistorianOptions with AlarmHistorian (Port default, Validate list, log context)

This commit is contained in:
Joseph Doherty
2026-06-14 20:23:22 -04:00
parent a6f1f4ef15
commit 83e1318425
2 changed files with 8 additions and 6 deletions
@@ -119,7 +119,7 @@ public static class ServiceCollectionExtensions
if (opts is not { Enabled: true }) return services; // leave the Null default from AddOtOpcUaRuntime
foreach (var warning in opts.Validate())
Serilog.Log.Logger.ForContext<ServerHistorianOptions>().Warning("ServerHistorian config: {ServerHistorianConfigWarning}", warning);
Serilog.Log.Logger.ForContext<IHistorianDataSource>().Warning("ServerHistorian config: {ServerHistorianConfigWarning}", warning);
// Last-registration-wins over the TryAddSingleton Null default seeded by AddOtOpcUaRuntime.
services.AddSingleton<IHistorianDataSource>(sp => dataSourceFactory(opts, sp));