fix: test output should go to the Xunit output
This commit is contained in:
parent
58bef22427
commit
d7902d215a
2 changed files with 3 additions and 2 deletions
|
@ -25,7 +25,7 @@
|
||||||
<PackageReference Include="Serilog.Exceptions" Version="7.0.0" />
|
<PackageReference Include="Serilog.Exceptions" Version="7.0.0" />
|
||||||
<PackageReference Include="Serilog.Extensions.Autofac.DependencyInjection" Version="4.0.0" />
|
<PackageReference Include="Serilog.Extensions.Autofac.DependencyInjection" Version="4.0.0" />
|
||||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" />
|
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
|
<PackageReference Include="Serilog.Sinks.Xunit" Version="1.0.21" />
|
||||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
|
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
|
||||||
<PackageReference Include="xunit" Version="2.3.1" />
|
<PackageReference Include="xunit" Version="2.3.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -23,7 +23,8 @@ namespace MfGames.TestSetup
|
||||||
.Enrich.WithExceptionDetails()
|
.Enrich.WithExceptionDetails()
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.MinimumLevel.Is(LogEventLevel.Debug)
|
.MinimumLevel.Is(LogEventLevel.Debug)
|
||||||
.WriteTo.Console(
|
.WriteTo.TestOutput(
|
||||||
|
output,
|
||||||
outputTemplate:
|
outputTemplate:
|
||||||
"[{Level:u3}] {Message}{NewLine}{Exception}")
|
"[{Level:u3}] {Message}{NewLine}{Exception}")
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
|
|
Reference in a new issue