Skip to content

Commit ce036eb

Browse files
authored
Merge pull request #69 from nblumhardt/fix-actions-build
Produce more output when `CarriesMessageTemplateProperties` fails
2 parents 6a99e66 + 9b64c85 commit ce036eb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/Seq.Extensions.Logging.Tests/Serilog/Extensions/Logging/SerilogLoggerTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,13 @@ public void CarriesMessageTemplateProperties()
238238
Assert.Equal("Hello, {Recipient}", sink.Writes[0].MessageTemplate.Text);
239239

240240
SelfLog.Disable();
241-
Assert.Empty(selfLog.ToString());
241+
242+
var selfLogContent = selfLog.ToString();
243+
if (!string.IsNullOrEmpty(selfLogContent))
244+
{
245+
// Test failures are hard to diagnose without the full SelfLog entry.
246+
throw new Exception(selfLogContent);
247+
}
242248
}
243249

244250
[Fact]

0 commit comments

Comments
 (0)