ikyriak / IdempotentAPI

A .NET library that handles the HTTP write operations (POST and PATCH) that can affect only once for the given request data and idempotency-key by using an ASP.NET Core attribute (filter).
MIT License
278 stars 40 forks source link

How to disable common info logs? #25

Closed william-keller closed 2 years ago

william-keller commented 2 years ago

How to disable common info logs?

My logs are being long and difficult to reach relevant messages.

Is there a way to disable just those info logs? keeping warning and error logs just when they happen

ikyriak commented 2 years ago

Hello @william-keller,

I have made some changes to check the logging level and improve logging performance. You can test the implementation by using the 0.3.0-prerelease-01 version.

Now we can set the logging level in our appsettings.json file, such as:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "IdempotentAPI.Core.Idempotency": "Warning"
    }
  }
}
ikyriak commented 2 years ago

Hello @william-keller,

The related improvement has been included in the 1.0.0 RC.01 release.

Please read the README.md and CHANGELOG.md files because this release has breaking changes.

You can find the 1.0.0 RC.01 NuGet packages here.

If you have any suggestions or comments please, do not hesitate to send them 😉