Tutorial by Examples

NLog.Extensions.Logging is the official NLog provider for Microsoft's in .NET Core and ASP.NET Core. Here and here are instruction and example respectively.
Instead of requesting an ILoggerFactory and creating an instance of ILogger explicitly, you can request an ILogger (where T is the class requesting the logger). public class TodoController : Controller { private readonly ILogger _logger; public TodoController(ILogger<TodoController...
1)In project.json, add below dependencies- "Serilog": "2.2.0", "Serilog.Extensions.Logging": "1.2.0", "Serilog.Sinks.RollingFile": "2.0.0", "Serilog.Sinks.File": "3.0.0" 2)In Startup.cs, add below lines in constru...

Page 1 of 1