diff --git a/build/dependencies.props b/build/dependencies.props index 0055552..a7bec04 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -26,7 +26,7 @@ 2.0.3 11.0.2 1.4.0 - 3.2.0 + 4.0.0 4.6.0-preview1-26907-04 1.7.0-preview1-26907-04 4.6.0-preview1-26829-04 diff --git a/src/Microsoft.Extensions.Logging.Testing/AssemblyTestLog.cs b/src/Microsoft.Extensions.Logging.Testing/AssemblyTestLog.cs index a2705e1..de41064 100644 --- a/src/Microsoft.Extensions.Logging.Testing/AssemblyTestLog.cs +++ b/src/Microsoft.Extensions.Logging.Testing/AssemblyTestLog.cs @@ -258,7 +258,7 @@ namespace Microsoft.Extensions.Logging.Testing .Enrich.FromLogContext() .Enrich.With(new AssemblyLogTimestampOffsetEnricher(logStart)) .MinimumLevel.Verbose() - .WriteTo.File(fileName, outputTemplate: "[{TimestampOffset}] [{SourceContext}] [{Level}] {Message}{NewLine}{Exception}", flushToDiskInterval: TimeSpan.FromSeconds(1), shared: true) + .WriteTo.File(fileName, outputTemplate: "[{TimestampOffset}] [{SourceContext}] [{Level}] {Message:l}{NewLine}{Exception}", flushToDiskInterval: TimeSpan.FromSeconds(1), shared: true) .CreateLogger(); return new SerilogLoggerProvider(serilogger, dispose: true); } diff --git a/test/Microsoft.Extensions.Logging.Testing.Tests/AssemblyTestLogTests.cs b/test/Microsoft.Extensions.Logging.Testing.Tests/AssemblyTestLogTests.cs index 0da6291..a6d1a06 100644 --- a/test/Microsoft.Extensions.Logging.Testing.Tests/AssemblyTestLogTests.cs +++ b/test/Microsoft.Extensions.Logging.Testing.Tests/AssemblyTestLogTests.cs @@ -101,15 +101,15 @@ namespace Microsoft.Extensions.Logging.Testing.Tests var testLogContent = MakeConsistent(File.ReadAllText(testLog)); Assert.Equal( -@"[OFFSET] [GlobalTestLog] [Information] Global Test Logging initialized at ""TIMESTAMP"". Configure the output directory via 'LoggingTestingFileLoggingDirectory' MSBuild property or set 'LoggingTestingDisableFileLogging' to 'true' to disable file logging. -[OFFSET] [GlobalTestLog] [Information] Starting test ""FakeTestName"" -[OFFSET] [GlobalTestLog] [Information] Finished test ""FakeTestName"" in DURATION +@"[OFFSET] [GlobalTestLog] [Information] Global Test Logging initialized at TIMESTAMP. Configure the output directory via 'LoggingTestingFileLoggingDirectory' MSBuild property or set 'LoggingTestingDisableFileLogging' to 'true' to disable file logging. +[OFFSET] [GlobalTestLog] [Information] Starting test FakeTestName +[OFFSET] [GlobalTestLog] [Information] Finished test FakeTestName in DURATION ", globalLogContent, ignoreLineEndingDifferences: true); Assert.Equal( -@"[OFFSET] [TestLifetime] [Information] Starting test ""FakeTestName"" at ""TIMESTAMP"" +@"[OFFSET] [TestLifetime] [Information] Starting test FakeTestName at TIMESTAMP [OFFSET] [TestLogger] [Information] Information! [OFFSET] [TestLogger] [Verbose] Trace! -[OFFSET] [TestLifetime] [Information] Finished test ""FakeTestName"" in DURATION +[OFFSET] [TestLifetime] [Information] Finished test FakeTestName in DURATION ", testLogContent, ignoreLineEndingDifferences: true); });