All the examples I can find about using Serilog in an ASP .NET Core Web Application use Microsoft's ILogger<T>
interface instead of using Serilog's ILogger
interface.
How do I make it so that Serilog's ILogger can be injected via constructor, instead?
using Serilog;
public class HomeController : Controller
{
ILogger logger;
public HomeController(ILogger logger)
{
this.logger = logger;
}
public IActionResult Index()
{
this.logger.Information("Index was called");
return View();
}
}