- Notifications
You must be signed in to change notification settings - Fork10.5k
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
Type of issue
Feature request / documentation enhancement
Description
Minimal API templates currently use standard ILogger logging,
but .NET 8+ supports source-generated loggers via [LoggerMessage].
Including a short sample in the templates or documentation would promote this modern, high-performance pattern.
Describe the solution you'd like
Suggested improvement
Add a section or snippet showing how to define a partial logging class with [LoggerMessage] attributes.
Demonstrate integration with minimal APIs (MapGet, MapPost, etc.).
Why this helps
Encourages developers to adopt efficient logging patterns consistent with analyzer CA1873 recommendations.
Additional context
No response