nreco / logging

Generic file logger for .NET Core (FileLoggerProvider) with minimal dependencies
MIT License
284 stars 56 forks source link

APIs Filtering #34

Closed khaled-ghub closed 2 years ago

khaled-ghub commented 2 years ago

Firstly I'd like to thank you for your library,

I used it in the following way: appsettings.json: contains the configuration middleware.cs: contains the HttpContext and creates a Logger then use it to LogInforamtion StartUp.cs: two methods: a. ConfigureServices: services.AddLogging and do the configuration b. Configure : calls the middleware for the app

I want to know if there is any configuration or any way to check the API method type before I call the middleware?

Thank you.

VitaliyMF commented 2 years ago

Sorry, I'm not sure that I understand the question.

Usage of ILogging interface is pretty the same as in case of, say, standard Console logging provider. Rules for log entries filtering are also the same as for Console.

khaled-ghub commented 2 years ago

Sorry, I'm not sure that I understand the question.

Usage of ILogging interface is pretty the same as in case of, say, standard Console logging provider. Rules for log entries filtering are also the same as for Console.

Thanks for your answer, I made API filtration inside the middleware by checking the request method type, I was ask for any way to know the method type before calling the middleware, but it's okay thank you again.

VitaliyMF commented 2 years ago

I guess this question is no longer actual, closing.