-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Feature Request
It would be helpful to have configuration options to exclude specific namespaces from the call stack output.
Use Case
In our application, we have several infrastructure namespaces that add noise to the call stack:
Microsoft.AspNetCore.*System.Threading.*EntityFramework.*
Proposed API
Log.Logger = new LoggerConfiguration()
.Enrich.WithCallStack(opts => opts
.ExcludeNamespaces("Microsoft.AspNetCore", "System.Threading")
.ExcludeByPattern("*.Infrastructure.*"))
.CreateLogger();Expected Output
Instead of:
MyApp.Services.UserService:42 --> Microsoft.AspNetCore.Mvc.Controller:123 --> MyApp.Controllers.UserController:15
Show:
MyApp.Services.UserService:42 --> MyApp.Controllers.UserController:15
This would make the call stacks much cleaner and more focused on application-specific code.
Priority
Medium - would significantly improve usability in enterprise applications.
Metadata
Metadata
Assignees
Labels
No labels