Open steveoh opened 4 years ago
Thanks for reporting this @steveoh. You are correct, that would make sense and be a small perf gain. Although I doubt it, making this change could be breaking for some users if they for some reason depend on that log message. For now, I'll slate this for a 4.0 release.
In the time being, you could filter out those messages from being logged.
How's the 4.0 development going? The log messages are getting rather annoying.
@steveoh It's been a bit delayed through other commitments. Hoping to carve some time out in the next few months to look at things in a solid block. Did you manage to filter the log messages to reduce the false warnings?
I have "CorrelationId": "Information"
and I suppose I could turn it up to Warning
.
I setup the correlation id with
EnforceHeader = false;
andIgnoreRequestHeader = true;
. The warning is still emitted.
I would think that if these two properties are set up this way then there shouldn't be a need to read the headers at all. Am I misunderstanding the properties?
https://github.com/stevejgordon/CorrelationId/blob/ae77ddcb4abdb7f42d21329b758ad9b4a7b4ba10/src/CorrelationId/CorrelationIdMiddleware.cs#L61-L83