Part-5: .NET Core - Logging in ASP.NET Core Web API using NLog

Share
Embed
  • Loading...
  • Published on:  Wednesday, May 15, 2019
  • In this session we will discuss following topic:

    Built-in logging providers:
    ASP.NET Core ships the following providers:
    • Console
    • Debug
    • EventSource
    • EventLog
    • TraceSource
    • AzureAppServicesFile
    • AzureAppServicesBlob
    • ApplicationInsights

    Third-party logging providers:
    Third-party logging frameworks that work with ASP.NET Core:
    • elmah.io
    • Gelf
    • JSNLog
    • KissLog.net
    • Loggr
    • NLog
    • Sentry
    • Serilog
    • Stackdriver

    Steps
    • Create/Use existing ASP.NET Core project
    • Add Nuget Package
    • Create a nlog.config file.
    • Update startup.cs
    • Write logs in controller

    References:

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.2
    https://github.com/NLog/NLog.Web/wiki/Getting-started-with-ASP.NET-Core-(project.json)
    https://github.com/NLog/NLog/wiki/Configuration-file
    https://github.com/nlog/NLog/wiki/EventLog-target
  • Source: https://youtu.be/eidewrnAvhA
Loading...

Comment