fix(site-event-logging): resolve SiteEventLogging-005,007,008,010 — background async writer, drop concrete downcast, surface write failures, test coverage
This commit is contained in:
@@ -18,11 +18,14 @@ public class EventLogQueryService : IEventLogQueryService
|
||||
private readonly ILogger<EventLogQueryService> _logger;
|
||||
|
||||
public EventLogQueryService(
|
||||
ISiteEventLogger eventLogger,
|
||||
SiteEventLogger eventLogger,
|
||||
IOptions<SiteEventLogOptions> options,
|
||||
ILogger<EventLogQueryService> logger)
|
||||
{
|
||||
_eventLogger = (SiteEventLogger)eventLogger;
|
||||
// Depend on the concrete recorder directly: queries must funnel database
|
||||
// access through its lock-guarded WithConnection. Taking ISiteEventLogger and
|
||||
// downcasting would throw InvalidCastException for any other implementation.
|
||||
_eventLogger = eventLogger;
|
||||
_options = options.Value;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user