Guards structured logging with IsEnabled checks

This commit is contained in:
BinaryAlley committed 2026-11-26 12:35:30 +02:00
1 parent ccbd653ee5
commit 2e53449ada
44 files changed
+448 -136

No files matched your search

@@ -113,6 +113,7 @@ public class PublicHostValidationHandlerTests
{
// Arrange
ILogger<PublicHostValidationHandler> mockLogger = Substitute.For<ILogger<PublicHostValidationHandler>>();
mockLogger.IsEnabled(Arg.Any<LogLevel>()).Returns(true);
StubHttpMessageHandler innerHandler = new();
PublicHostValidationHandler handler = new(CreateValidator(), mockLogger) { InnerHandler = innerHandler };
using HttpClient client = new(handler);