Best approach for logging in ASP.NET

This page summarizes the projects mentioned and recommended in the original post on /r/dotnet

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • NLog

    NLog - Advanced and Structured Logging for Various .NET Platforms

  • Log4Net does not get that much attention any more. From my understanding it served as an alternative for Log4J, but today better and more modern solutions have been created. I migrated a codebase over to .NET Core a couple of years ago, and it seemed that Log4net had issues running on Linux because of kernel calls inside their codebase. If you look at the version history on NuGet, it had just 3 patch releases last year. As an alternative, I would suggest to check out NLog.

  • seq-logging-aspnetcore

    A very simple example showing why we want structured logs

  • I have a minimal example for logging with Serilog if you're interested: https://github.com/hyrmn/seq-logging-aspnetcore

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • log4net

  • Log4Net does not get that much attention any more. From my understanding it served as an alternative for Log4J, but today better and more modern solutions have been created. I migrated a codebase over to .NET Core a couple of years ago, and it seemed that Log4net had issues running on Linux because of kernel calls inside their codebase. If you look at the version history on NuGet, it had just 3 patch releases last year. As an alternative, I would suggest to check out NLog.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts