diff --git a/test/Kestrel.FunctionalTests/HttpsTests.cs b/test/Kestrel.FunctionalTests/HttpsTests.cs index 152823f6a9..9190597c3b 100644 --- a/test/Kestrel.FunctionalTests/HttpsTests.cs +++ b/test/Kestrel.FunctionalTests/HttpsTests.cs @@ -412,7 +412,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests { if (logLevel == LogLevel.Error) { - _errorMessages.Add(formatter(state, exception)); + var log = $"Log {logLevel}[{eventId}]: {formatter(state, exception)} {exception?.Message}"; + _errorMessages.Add(log); } if (exception is ObjectDisposedException) diff --git a/test/Kestrel.FunctionalTests/RequestTests.cs b/test/Kestrel.FunctionalTests/RequestTests.cs index ff063b35bf..a6ce1b5db9 100644 --- a/test/Kestrel.FunctionalTests/RequestTests.cs +++ b/test/Kestrel.FunctionalTests/RequestTests.cs @@ -409,7 +409,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests .Setup(logger => logger.Log(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny>())) .Callback>((logLevel, eventId, state, exception, formatter) => { - _output.WriteLine(logLevel + ": " + formatter(state, exception)); + var log = $"Log {logLevel}[{eventId}]: {formatter(state, exception)} {exception?.Message}"; + _output.WriteLine(log); if (eventId.Id == _connectionResetEventId) {