Log levels for logging in ASP.NET Core

In ASP.NET Core, you can use the Microsoft.Extensions.Logging NuGet package to write logs to a number of logging providers with ILogger.

Within ILogger, there are a number of log levels that can be written as part of a log. These include:

  • Warning
  • Error
  • Critical
  • Debug
  • Trace
  • Information

Can you order these log levels in-order of severity level? Start with 0 being the least severe, and go up to 5 which will be the most severe.

Learn more about logging in .NET by watching our video: