Skip to content

Support for custom field(s) logging #267

@olljanat

Description

@olljanat

We should have support to enable custom field(s) to IIS logging.

I can probably create that feature but how you think that it should be implemented?

Example "X-Forwarded-For" header can be included to logging using this PowerShell command:
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/sites/siteDefaults/logFile/customFields" -name "." -value @{logFieldName='Original-IP';sourceName='X-Forwarded-For';sourceType='RequestHeader'}

It needs these four parameters:

  • Site name/Site defaults selection
  • Field name where value will be stored on log
  • Source parameter name where value will be read
  • Source type, valid inputs are "RequestHeader","ResponseHeader" and "ServerVariable"

Do you prefer that this should be included to existing "xIISLogging" and "xWebsite" modules (and if so how to do input validation correct way?) or would it be better idea create new "xIISCustomLogging", etc module?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions