dotnet-logging-configuration
Installation
SKILL.md
Logging Configuration for .NET
Overview
This skill configures structured logging following Microsoft best practices:
- ILogger - Inject into services for category-based logging
- ILoggerFactory - Create loggers dynamically when needed
- Structured Logging - Preserve log properties for analysis
- Source Generators - High-performance compile-time logging
- Serilog Integration - Enhanced sinks and enrichers
Quick Reference
| Interface | Lifetime | Use Case |
|---|---|---|
ILogger<T> |
Singleton | Standard service logging |
ILoggerFactory |
Singleton | Create loggers dynamically |
ILogger |
- | Non-generic (avoid in DI) |