Hi.
When I have logging configuration like this:
<site name="Web" id="1"><application path="/rest" applicationPool="Clr4IntegratedAppPool"><virtualDirectory path="/" physicalPath="c:\some-path" /></application><bindings><binding protocol="http" bindingInformation="*:1897:localhost" /></bindings><traceFailedRequestsLogging enabled="true" /><logFile logExtFileFlags="Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, UserAgent, Cookie, Referer, ProtocolVersion, Host, HttpSubStatus"><customFields><clear /><!--<add logFieldName="ServerRequestId" sourceName="x-requestId" sourceType="ResponseHeader" />--></customFields></logFile></site>
all works fine and produces logs as usual:
#Software: Microsoft Internet Information Services 10.0 #Version: 1.0 #Date: 2015-05-27 11:52:33 #Fields: date time s-sitename s-computername s-ip <non-related-good-headers-here> 2015-05-27 11:52:33 W3SVC1 POPOV-A ::1 GET /rest/ - 1897 - <non-related-good-log-here>
But if I uncomment line in config with headers IIS starts to log header value (expected behaviour) but it replaces "sitename" entry (which is bad and not expected):
#Software: Microsoft Internet Information Services 10.0 #Version: 1.0 #Date: 2015-05-27 12:32:52 #Fields: date time s-sitename s-ip cs-method <usual headers> 2015-05-27 12:32:52 2000000001+ServerRequestId+-+ 127.0.0.1 GET /rest/ - 1897 - <non-related-log>
How to configure IIS to log header and not to replace sitename?
Thank you!