It seems the request logger is somewhat zealous in what it tries to log all requests coming in, which creates a mass of entries very quickly when loading the OpenAPI/Swagger documentation. Even just loading the main page creates several entries. As we are only interested in logging actual API calls, how can we ignore the “noise?”
My configuration is:
ExcludeRequestDtoTypes = new System.Type[] { null, typeof(OpenApiSpecification), typeof(RequestLogs)}
but, null requests are still attempting to be logged (confirmed in the debugger that the code is proceeding even if request type is null). Further, I am now also getting requests of type AspNetRequest (this wasn’t happening a few weeks ago - I assume some change on your side).
I can of course add AspNetRequest to my list of Excludes, but that doesn’t solve for nulls. Additionally, if the request types will be changing, perhaps it isn’t ideal to ask all of us that only want to log API requests to maintain our own exclude lists that facilitate that.