2 writes to LogLevel
Microsoft.AspNetCore.InternalTesting (1)
Logging\TestLogger.cs (1)
51LogLevel = logLevel,
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\LogSinkProvider.cs (1)
39LogLevel = logLevel,
125 references to LogLevel
IIS.Tests (3)
MaxRequestBodySizeTests.cs (2)
357var appErrorLog = Assert.Single(TestSink.Writes, w => w.LoggerName == "Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer" && w.LogLevel > LogLevel.Debug); 361Assert.Equal(LogLevel.Error, appErrorLog.LogLevel);
StrictTestServerTests.cs (1)
20if (TestSink.Writes.FirstOrDefault(w => w.LogLevel > LogLevel.Information) is WriteContext writeContext)
InMemory.FunctionalTests (9)
BadHttpRequestTests.cs (1)
227Assert.All(TestSink.Writes.Where(w => w.LoggerName != "Microsoft.Hosting.Lifetime"), w => Assert.InRange(w.LogLevel, LogLevel.Trace, LogLevel.Debug));
ChunkedRequestTests.cs (1)
1072Assert.All(TestSink.Writes, w => Assert.InRange(w.LogLevel, LogLevel.Trace, LogLevel.Information));
Http2\Http2StreamTests.cs (1)
4723Assert.Contains(TestSink.Writes, w => w.EventId.Id == 13 && w.LogLevel == LogLevel.Error
RequestBodyTimeoutTests.cs (2)
143Assert.Contains(TestSink.Writes, w => w.EventId.Id == 32 && w.LogLevel == LogLevel.Information); 144Assert.Contains(TestSink.Writes, w => w.EventId.Id == 33 && w.LogLevel == LogLevel.Information);
RequestTests.cs (1)
2030Assert.All(TestSink.Writes, w => Assert.InRange(w.LogLevel, LogLevel.Trace, LogLevel.Information));
ResponseTests.cs (3)
510Assert.Contains(TestSink.Writes, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException 4133Assert.Contains(TestSink.Writes, w => w.EventId.Id == 13 && w.LogLevel == LogLevel.Error 4764Assert.Contains(testSink.Writes, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException
Interop.FunctionalTests (2)
Http3\Http3RequestTests.cs (2)
1054var badLogWrite = TestSink.Writes.FirstOrDefault(w => w.LogLevel == LogLevel.Critical); 1140var badLogWrite = TestSink.Writes.FirstOrDefault(w => w.LogLevel >= LogLevel.Critical);
Microsoft.AspNetCore.Antiforgery.Test (7)
DefaultAntiforgeryTest.cs (7)
384.Where(wc => wc.LogLevel == LogLevel.Warning) 402.Where(wc => wc.LogLevel == LogLevel.Warning) 420.Where(wc => wc.LogLevel == LogLevel.Warning) 438.Where(wc => wc.LogLevel == LogLevel.Warning) 1300.Where(wc => wc.LogLevel == LogLevel.Warning) 1339.Where(wc => wc.LogLevel == LogLevel.Warning) 1373.Where(wc => wc.LogLevel == LogLevel.Warning)
Microsoft.AspNetCore.Components.Tests (2)
Lifetime\ComponentStatePersistenceManagerTest.cs (2)
205Assert.Equal(LogLevel.Error, log.LogLevel); 234Assert.Equal(LogLevel.Error, log.LogLevel);
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerTest.cs (1)
654w.LogLevel == LogLevel.Warning
Microsoft.AspNetCore.Http.Extensions.Tests (30)
RequestDelegateFactoryTests.cs (2)
1582Assert.Equal(LogLevel.Debug, log.LogLevel); 1681Assert.Equal(LogLevel.Debug, log.LogLevel);
RequestDelegateGenerator\CompileTimeCreationTests.cs (2)
564Assert.Equal(LogLevel.Debug, log1.LogLevel); 572Assert.Equal(LogLevel.Debug, log2.LogLevel);
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (3)
394Assert.Equal(LogLevel.Debug, logs[0].LogLevel); 398Assert.Equal(LogLevel.Debug, logs[1].LogLevel); 402Assert.Equal(LogLevel.Debug, logs[2].LogLevel);
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (1)
143Assert.Equal(LogLevel.Debug, log.LogLevel);
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (3)
346Assert.Equal(LogLevel.Debug, logMessage.LogLevel); 942Assert.Equal(LogLevel.Debug, logMessage.LogLevel); 976Assert.Equal(LogLevel.Debug, logMessage.LogLevel);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (1)
475Assert.Equal(LogLevel.Debug, log.LogLevel);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (1)
132Assert.Equal(LogLevel.Debug, log.LogLevel);
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (15)
50Assert.Equal(LogLevel.Debug, logs[0].LogLevel); 58Assert.Equal(LogLevel.Debug, logs[1].LogLevel); 66Assert.Equal(LogLevel.Debug, logs[2].LogLevel); 74Assert.Equal(LogLevel.Debug, logs[3].LogLevel); 113Assert.Equal(LogLevel.Debug, logs[0].LogLevel); 121Assert.Equal(LogLevel.Debug, logs[1].LogLevel); 233Assert.Equal(LogLevel.Debug, logs[0].LogLevel); 241Assert.Equal(LogLevel.Debug, logs[1].LogLevel); 313Assert.Equal(LogLevel.Debug, logs[0].LogLevel); 321Assert.Equal(LogLevel.Debug, logs[1].LogLevel); 403Assert.Equal(LogLevel.Debug, logMessage.LogLevel); 452Assert.Equal(LogLevel.Debug, logMessage.LogLevel); 493Assert.Equal(LogLevel.Debug, logMessage.LogLevel); 531Assert.Equal(LogLevel.Debug, logMessage.LogLevel); 611Assert.Equal(LogLevel.Debug, logMessage.LogLevel);
RequestDelegateGenerator\RequestDelegateCreationTests.QueryParameters.cs (1)
68Assert.Equal(LogLevel.Debug, log.LogLevel);
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (1)
184Assert.Equal(LogLevel.Debug, log.LogLevel);
Microsoft.AspNetCore.HttpLogging.Tests (1)
HttpLoggingMiddlewareTests.cs (1)
1528var lines = Assert.Single(TestSink.Writes.Where(w => w.LogLevel >= LogLevel.Information)).Message.Split(Environment.NewLine);
Microsoft.AspNetCore.HttpsPolicy.Tests (14)
HstsMiddlewareTests.cs (5)
214Assert.Equal(LogLevel.Debug, message.LogLevel); 269Assert.Equal(LogLevel.Trace, message.LogLevel); 324Assert.Equal(LogLevel.Debug, message.LogLevel); 371Assert.Equal(LogLevel.Debug, message.LogLevel); 417Assert.Equal(LogLevel.Trace, message.LogLevel);
HttpsRedirectionMiddlewareTests.cs (9)
61Assert.Equal(LogLevel.Warning, message.LogLevel); 117Assert.Equal(LogLevel.Debug, message.LogLevel); 173Assert.Equal(LogLevel.Debug, message.LogLevel); 274Assert.Equal(LogLevel.Debug, message.LogLevel); 278Assert.Equal(LogLevel.Debug, message.LogLevel); 362Assert.Equal(LogLevel.Debug, message.LogLevel); 366Assert.Equal(LogLevel.Debug, message.LogLevel); 408Assert.Equal(LogLevel.Warning, message.LogLevel); 452Assert.Equal(LogLevel.Warning, message.LogLevel);
Microsoft.AspNetCore.InternalTesting (1)
Logging\WriteContext.cs (1)
34return $"{LogLevel} {LoggerName}: {Message}";
Microsoft.AspNetCore.InternalTesting.Tests (4)
LoggedTestXunitTests.cs (4)
74Assert.Equal(LogLevel.Information, message.LogLevel); 85Assert.Equal(LogLevel.Debug, message.LogLevel); 98Assert.Equal(LogLevel.Information, message.LogLevel); 161Assert.Equal(LogLevel.Trace, message.LogLevel);
Microsoft.AspNetCore.Localization.Tests (2)
CookieRequestCultureProviderTest.cs (2)
224Assert.Equal(LogLevel.Debug, write.LogLevel); 283Assert.Equal(LogLevel.Debug, write.LogLevel);
Microsoft.AspNetCore.Mvc.Core.Test (3)
Filters\RequestFormLimitsFilterTest.cs (3)
73Assert.Equal(LogLevel.Warning, write.LogLevel); 98Assert.Equal(LogLevel.Debug, write.LogLevel); 124Assert.Equal(LogLevel.Debug, write.LogLevel);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerOutputFormatterTest.cs (1)
666Assert.Equal(LogLevel.Warning, write.LogLevel);
XmlSerializerOutputFormatterTest.cs (1)
483Assert.Equal(LogLevel.Warning, write.LogLevel);
Microsoft.AspNetCore.OutputCaching.Tests (1)
TestUtils.cs (1)
265Assert.Equal(expectedMessages[i].LogLevel, messageList[i].LogLevel);
Microsoft.AspNetCore.RateLimiting.Tests (1)
RateLimitingMiddlewareTests.cs (1)
161Assert.Equal(LogLevel.Debug, message.LogLevel);
Microsoft.AspNetCore.RequestDecompression.Tests (2)
DefaultRequestDecompressionProviderTests.cs (1)
173Assert.Equal(level, log.LogLevel);
RequestDecompressionMiddlewareTests.cs (1)
662Assert.Equal(level, log.LogLevel);
Microsoft.AspNetCore.ResponseCaching.Tests (1)
TestUtils.cs (1)
251Assert.Equal(expectedMessages[i].LogLevel, messageList[i].LogLevel);
Microsoft.AspNetCore.ResponseCompression.Tests (1)
ResponseCompressionMiddlewareTest.cs (1)
1332Assert.Equal(level, log.LogLevel);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
RequestTests.cs (1)
397var errorLogs = TestSink.Writes.Where(w => w.LogLevel >= LogLevel.Error).Select(w => w.Exception);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
ConnectionDispatcherTests.cs (2)
66var critical = TestSink.Writes.SingleOrDefault(m => m.LogLevel == LogLevel.Critical); 113var errors = TestSink.Writes.Where(e => e.LogLevel >= LogLevel.Error).ToArray();
HeartbeatTests.cs (2)
136var warningMessage = TestSink.Writes.Single(message => message.LogLevel == LogLevel.Warning).Message; 197Assert.Equal(ex, TestSink.Writes.Single(message => message.LogLevel == LogLevel.Error).Exception);
Microsoft.AspNetCore.Session.Tests (18)
SessionTests.cs (18)
370Assert.Equal(LogLevel.Information, sessionLogMessages[0].LogLevel); 372Assert.Equal(LogLevel.Debug, sessionLogMessages[1].LogLevel); 438Assert.Equal(LogLevel.Information, sessionLogMessages[0].LogLevel); 439Assert.Equal(LogLevel.Debug, sessionLogMessages[1].LogLevel); 440Assert.Equal(LogLevel.Information, sessionLogMessages[2].LogLevel); 684Assert.Equal(LogLevel.Error, message.LogLevel); 733Assert.Equal(LogLevel.Error, message.LogLevel); 781Assert.Equal(LogLevel.Warning, message.LogLevel); 882Assert.Equal(LogLevel.Information, sessionLogMessage.LogLevel); 887Assert.Equal(LogLevel.Error, sessionMiddlewareLogMessage.LogLevel); 945Assert.Equal(LogLevel.Information, sessionLogMessages[0].LogLevel); 948Assert.Equal(LogLevel.Warning, sessionLogMessages[1].LogLevel); 953Assert.Equal(LogLevel.Information, sessionMiddlewareLogs[0].LogLevel); 1012Assert.Equal(LogLevel.Information, sessionLogMessages[0].LogLevel); 1015Assert.Equal(LogLevel.Debug, sessionLogMessages[1].LogLevel); 1076Assert.Equal(LogLevel.Information, sessionLogMessages[0].LogLevel); 1079Assert.Equal(LogLevel.Debug, sessionLogMessages[1].LogLevel); 1127Assert.Equal(LogLevel.Error, message.LogLevel);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
1392Assert.Equal(LogLevel.Error, errorLog.Write.LogLevel); 1446Assert.Equal(LogLevel.Error, errorLog.Write.LogLevel);
Microsoft.AspNetCore.SignalR.Client.Tests (2)
HubConnectionTests.Reconnect.cs (2)
364Assert.Equal(LogLevel.Information, attemptsLog.Write.LogLevel); 369Assert.Equal(LogLevel.Trace, waitingLog.Write.LogLevel);
Microsoft.AspNetCore.SignalR.Tests.Utils (3)
ServerLogScope.cs (1)
60logger.Log(write.LogLevel, write.EventId, write.State, write.Exception, write.Formatter);
src\Shared\SignalR\InProcessTestServer.cs (1)
144builder.AppendLine(FormattableString.Invariant($"{log.Timestamp:O} {log.Write.LoggerName} {log.Write.LogLevel}: {log.Write.Formatter(log.Write.State, log.Write.Exception)}"));
src\Shared\SignalR\VerifyNoErrorScope.cs (1)
36var results = _sink.GetLogs().Where(w => w.Write.LogLevel >= LogLevel.Error).ToList();
Sockets.FunctionalTests (8)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (5)
265if (context.LogLevel > LogLevel.Debug) 317if (context.LogLevel > LogLevel.Debug) 357if (context.LogLevel > LogLevel.Debug) 416if (context.LogLevel > LogLevel.Debug) 479if (context.LogLevel > LogLevel.Debug)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (3)
417Assert.DoesNotContain(transportLogs, w => w.LogLevel > LogLevel.Debug); 457Assert.DoesNotContain(transportLogs, w => w.LogLevel > LogLevel.Debug); 458Assert.DoesNotContain(coreLogs, w => w.LogLevel > LogLevel.Information);