Roadmap › 1. .NET › Step 23
Log
Logging & Custom Logging in .NET — ILogger, Serilog, NLog, log4net and Your Own Logger
Why and what to log, log levels, structured vs plain-text logging, Microsoft.Extensions.Logging (ILogger, providers, categories, filtering, scopes, high-performance LoggerMessage source generators), Serilog (sinks, enrichers, request logging), NLog and log4net (including .NET Framework apps), Trace and Windows Event Log, writing a custom logger provider (file and database), audit logging, correlation ids and distributed tracing with OpenTelemetry and Application Insights, log storage and querying (Seq, ELK, Azure Monitor/KQL), security (PII, secrets) and performance.
Interview priority:★ Must know High priority — asked in almost every interview, learn firstMedium asked regularlyLow good to know
Module 1: Logging Fundamentals
- 1.What to log, log levels and structured loggingBasic ★ Must know
- 2.Microsoft.Extensions.Logging — ILogger, providers and configurationBasic ★ Must know
- 3.Scopes, correlation ids and high-performance loggingIntermediate ★ Must know
Module 2: Logging Libraries
- 4.Serilog — sinks, enrichers and request loggingIntermediate ★ Must know
- 5.NLog and log4net (including .NET Framework apps)Intermediate Medium
Module 3: Custom and Production Logging
- 6.Writing a custom logger provider (file and database)Advanced ★ Must know
- 7.Audit logging vs diagnostic loggingIntermediate ★ Must know
- 8.OpenTelemetry, Application Insights and querying logs in productionIntermediate ★ Must know
Next course in the roadmap: 24. Custom Controls & Reusable UI Components in .NET — Web Forms to Blazor →