Microsoft.Extensions.Logging
The standard logging abstraction and default implementation used throughout modern .NET hosting.
Decision Guide
Start with the logging abstraction already used by the host. The practical decision is usually about provider pipeline, event shape, correlation, and operations model rather than whether an application should log at all.
The decision to make
Which logging provider fits an ASP.NET Core or worker application?
Curated starting points to compare. Always evaluate suitability against your specific project requirements.
The standard logging abstraction and default implementation used throughout modern .NET hosting.
Serilog integration for ASP.NET Core, centred on structured events and a large sink ecosystem.
NLog integration for ASP.NET Core with flexible target and rule configuration.
Define a small event vocabulary first: stable event IDs or names, log levels, required correlation fields, and data classification rules. Keep messages useful without placing secrets or raw personal data in properties.
Configure a single provider pipeline through Microsoft.Extensions.Logging. Add request logging, trace correlation, and scoped properties at host boundaries rather than manually in every method.
Validate operations end-to-end: query a failed request by correlation ID, verify retention and access controls, and load-test the chosen sink's back-pressure behavior.
Risk
Checklist
Review logging choices when observability moves to OpenTelemetry, when retention or compliance requirements change, or when new sensitive-data redaction rules are introduced.