2025迁移版本,多项规则修改
This commit is contained in:
20
MesETL.Test/XUnit/Logging/XUnitLoggerProvider.cs
Normal file
20
MesETL.Test/XUnit/Logging/XUnitLoggerProvider.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace TestProject1.XUnit.Logging;
|
||||
|
||||
public class XunitLoggerProvider : ILoggerProvider
|
||||
{
|
||||
private readonly ITestOutputHelper _testOutputHelper;
|
||||
|
||||
public XunitLoggerProvider(ITestOutputHelper testOutputHelper)
|
||||
{
|
||||
_testOutputHelper = testOutputHelper;
|
||||
}
|
||||
|
||||
public ILogger CreateLogger(string categoryName)
|
||||
=> new XunitLogger(_testOutputHelper, categoryName);
|
||||
|
||||
public void Dispose()
|
||||
{ }
|
||||
}
|
Reference in New Issue
Block a user