refactor(logging): adopt ZB.MOM.WW.Telemetry.Serilog bootstrap
Swap the gateway process logging from the default Microsoft.Extensions.Logging provider onto the shared ZB.MOM.WW.Telemetry.Serilog two-stage bootstrap. - Add a cross-repo ProjectReference to ZB.MOM.WW.Telemetry.Serilog (transitively brings the Telemetry core package); the referenced project resolves its own Directory.Build.props / Directory.Packages.props so it does not perturb this build. - Replace MEL wiring in GatewayApplication with builder.AddZbSerilog(ServiceName= "mxgateway"; SiteId/NodeRole read from MxGateway:Telemetry when present) and add app.UseSerilogRequestLogging(). - Add a Serilog section (Console + daily rolling File sinks, MinimumLevel) to appsettings.json and a MinimumLevel override to appsettings.Development.json, replacing the old MEL Logging sections. The net48/x86 worker is untouched. Correlation scope + redaction move to the shared ILogRedactor seam in the follow-up commit.
This commit is contained in:
@@ -15,6 +15,13 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ZB.MOM.WW.MxGateway.Contracts\ZB.MOM.WW.MxGateway.Contracts.csproj" />
|
||||
<!--
|
||||
Shared structured-logging bootstrap (ZB.MOM.WW.Telemetry.Serilog) lives in the sibling
|
||||
scadaproj workspace. Cross-repo ProjectReference: the referenced project resolves its own
|
||||
Directory.Build.props / Directory.Packages.props from its own tree, so it does not perturb
|
||||
this repo's build settings. It transitively brings the ZB.MOM.WW.Telemetry core package.
|
||||
-->
|
||||
<ProjectReference Include="..\..\..\scadaproj\ZB.MOM.WW.Telemetry\src\ZB.MOM.WW.Telemetry.Serilog\ZB.MOM.WW.Telemetry.Serilog.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user