8000 Fallback to Microsoft Logging Formatter when mixing positional with s… · NLog/NLog.Extensions.Logging@6a377ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 6a377ff

Browse files
authored
Fallback to Microsoft Logging Formatter when mixing positional with structured (test coverage) (#757)
1 parent 9c877a7 commit 6a377ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/NLog.Extensions.Logging.Tests/LoggerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public void TestInvalidFormatString()
220220
[Fact]
221221
public void TestInvalidFormatString2()
222222
{
223-
var runner = GetRunner<Runner>(new NLogProviderOptions { CaptureMessageTemplates = true });
223+
var runner = GetRunner<Runner>(new NLogProviderOptions { CaptureMessageTemplates = false });
224224
var ex = Assert.Throws<AggregateException>(() => runner.Logger.LogDebug("{0}{1}", "Test"));
225225
Assert.IsType<FormatException>(ex.InnerException);
226226
}
@@ -236,7 +236,7 @@ public void TestInvalidMixFormatString()
236236
[Fact]
237237
public void TestInvalidMixFormatString2()
238238
{
239-
var runner = GetRunner<Runner>(new NLogProviderOptions { CaptureMessageTemplates = true });
239+
var runner = GetRunner<Runner>(new NLogProviderOptions { CaptureMessageTemplates = false });
240240
runner.Logger.LogDebug("{0}{Mix}", "Mix", "Test");
241241
Assert.Equal("NLog.Extensions.Logging.Tests.LoggerTests.Runner|DEBUG|MixTest|0=Mix, Mix=Test", runner.LastTargetMessage);
242242
}

0 commit comments

Comments
 (0)
0