capslo
Logging System Design Advice for .NET CQRS Modular Monolith
I need to design a logging system for a .NET modular monolith application that uses CQRS pattern. Key requirements:
Using custom mediator implementation (not MediatR)
Logs don't need to be in PostgreSQL (though we currently use it)
Need to capture full context for every action (Organization, Service Provider, Customer)
Must log user actions (create, edit, delete, import, export,active,deactive,copy)
Need to support saving log filters as views and CSV exports
GDPR compliance with data anonymization
Plan to add technical logs to files in the future
Which approach would you recommend as best practice: decorator, dispatcher, or EF Core interceptor? Any experience implementing similar logging systems?
Should I kepp all logs in one table or create separate tables for each context ?
14 replies