feat(otopcua): bridge Akka actor logs into Serilog
DriverHostActor/DriverInstanceActor and cluster events log via Akka's ILoggingAdapter, which had no Serilog bridge — under the Windows service host the default StandardOutLogger output is discarded, making the driver-role actor graph invisible (this masked the data-plane diagnosis). - Add Akka.Logger.Serilog 1.5.60 (deps satisfied by Akka 1.5.62 / Serilog 4.3.1). - WithOtOpcUaClusterBootstrap: ConfigureLoggers(DebugLevel; ClearLoggers(); AddLogger<SerilogLogger>()) — Akka.Hosting owns logger setup, so HOCON akka.loggers alone is not honored. - Program.cs: set static Serilog.Log.Logger from the DI root logger after Build() (AddZbSerilog registers the MEL provider but not the static logger, which the Akka SerilogLogger and the startup banner both need).
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
# Any divergence from these defaults must be deliberate and recorded in docs/v2/Architecture.md.
|
||||
|
||||
akka {
|
||||
# Akka logger wiring (route ILoggingAdapter → Serilog) is configured via Akka.Hosting's
|
||||
# ConfigureLoggers in ServiceCollectionExtensions.WithOtOpcUaClusterBootstrap — HOCON
|
||||
# `akka.loggers` alone is not honored by Akka.Hosting. logger-startup-timeout is kept here
|
||||
# since the Serilog logger can be slow to initialize at startup.
|
||||
logger-startup-timeout = 30s
|
||||
|
||||
extensions = [
|
||||
"Akka.Cluster.Tools.PublishSubscribe.DistributedPubSubExtensionProvider, Akka.Cluster.Tools"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user