ASP.NET Core Structured Logging
Implements Serilog structured logging for ASP.NET Core applications with best practices for message templates, enrichment, and security.
This skill provides comprehensive guidance for integrating Serilog into ASP.NET Core projects, moving beyond simple text logs to high-performance, structured observability. It includes pre-configured setups for bootstrap logging to capture early startup errors, LogContext enrichment for deep request tracing, and optimized middleware for HTTP request logging. By enforcing strict security rules and message template conventions, it ensures that developers capture actionable data while protecting sensitive information and maintaining high application performance through zero-allocation logging techniques.
주요 기능
01High-performance request logging middleware with custom diagnostic context
02Comprehensive Serilog setup with bootstrap logging for early-stage error capture
03Structured message templates and LogContext enrichment for enhanced observability
04Strict security guidelines to prevent accidental logging of PII or credentials
053 GitHub stars
06Correlation with OpenTelemetry for end-to-end tracing across distributed services
사용 사례
01Troubleshooting complex production issues using correlation IDs and LogContext enrichment
02Migrating from standard text-based logging to structured Serilog events for ELK or Seq
03Implementing enterprise-grade logging in a new ASP.NET Core microservice