Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added optional propertyName argument to WithRequestHeader #25

Conversation

pawan-regoti
Copy link
Contributor

@pawan-regoti pawan-regoti commented Aug 16, 2023

as of now, there is no way to specify the property name for WithRequestHeader extension.
it can be easily implemented using code changes in this pull request

{
  "Serilog": {
    "MinimumLevel": "Debug",
    "Using":  [ "Serilog.Enrichers.ClientInfo" ],
    "Enrich": [
      {
        "Name": "WithRequestHeader",
        "Args": {
          "headerName": "Content-Length",
          "propertyName": "RequestLength"
        }
      }
    ],
  }

@pawan-regoti pawan-regoti changed the title added propertyName argument to WithRequestHeader added optional propertyName argument to WithRequestHeader Aug 16, 2023
@mo-esmp
Copy link
Member

mo-esmp commented Aug 18, 2023

@pawan-regoti Thanks for the PR, I'll review and merge it soon.

@mo-esmp mo-esmp merged commit c1b40f0 into serilog-contrib:master Aug 23, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants