/.NET-Logging-Extensions

Additions and extensions for .NET logging.

Primary LanguageC#MIT LicenseMIT

.NET-Logging-Extensions

Additions and extensions for .NET logging.

NuGet

1 Information

For the moment this solution only contains extensions for ILogger, LoggerExtension:

  • LogDebugIfEnabled
  • LogInformationIfEnabled
  • etc

The reason is "prestanda". Do not do anything more if the log-level is not enabled. I haven't found so much about it, except here:

I am not sure if this is necessary, but anyhow. Doing the check everywhere in your code always needs an extra line of code to check if it is enabled. So if we have an extension-method for it we can do it with a one-liner.

2 Links