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?
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:
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?