Logging best practices extensions for ILogger
$ dotnet add package MinApiLib.LoggingThis package contains extensions to use fast logging in your projects. It uses the best practices from this Microsoft's article.
You can install this package using the NuGet package manager:
Install-Package MinApiLib.DependencyInjection
Or using the .NET CLI:
dotnet add package MinApiLib.DependencyInjection
To use the logging, you can use the ILogger extensions:
global using MinApiLib.Logging;
This ILogger extensions will add the following methods:
ILogger.Critical(string message, Exception? ex);
ILogger.Debug(string message);
ILogger.Error(string message, Exception? ex);
ILogger.Information(string message);
ILogger.Trace(string message);