Closed Freysi21 closed 2 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Heeey, first ever pull request I thought made sense. Why is it gone stale? I've used this in production and its been a life saver for my logs. Just curious about my baby contribution. Thank you for these enrichers. They are great :) @mrstebo @lkurzyniec @ejcoyle88 @jackcaldwell
Hi, please see #96 for why your MR went stale.
I modified the original Enricher to support logging of any header rather then just x-correlation-id. The first parameter is the header name in http request. The second the name of the property to create in log and last is a boolean to decide if a value should be created if not provided in http headers.
.Enrich.CreateOrIncludeWithHeader("X-Correlation-ID", "CorrelationId", true) .Enrich.CreateOrIncludeWithHeader("X-Session-ID", "SessionId", false) .Enrich.CreateOrIncludeWithHeader("X-User-ID", "UserId", false)