Unit tests working; added logger adapter.
This commit is contained in:
18
src/Infrastructure/Logging/LoggerAdapter.cs
Normal file
18
src/Infrastructure/Logging/LoggerAdapter.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using ApplicationCore.Interfaces;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Infrastructure.Logging
|
||||
{
|
||||
public class LoggerAdapter<T> : IAppLogger<T>
|
||||
{
|
||||
private readonly ILogger<T> _logger;
|
||||
public LoggerAdapter(ILoggerFactory loggerFactory)
|
||||
{
|
||||
_logger = loggerFactory.CreateLogger<T>();
|
||||
}
|
||||
public void LogWarning(string message, params object[] args)
|
||||
{
|
||||
_logger.LogWarning(message, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user