【问题标题】:Inconsistent IIS log configurationIIS 日志配置不一致
【发布时间】:2019-12-23 19:35:13
【问题描述】:

我们在 IIS 中有两个不同的站点,似乎都设置为记录相同的默认 W3C 字段(根据 IIS UI)。然而,其中之一是记录所有默认字段,其中之一是包含附加字段。

标准:#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken

扩展: #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken

服务器级日志记录定义配置为记录扩展的 W3C 字段。根据 applicationHost.config:

<logFile logExtFileFlags="Date, Time, ClientIP, UserName, SiteName, ComputerName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, BytesSent, BytesRecv, TimeTaken, ServerPort, UserAgent, Referer, ProtocolVersion, Host, HttpSubStatus" logFormat="W3C" directory="%SystemDrive%\inetpub\logs\LogFiles" />

所以我想我的问题是,IIS 如何准确确定格式将是什么,为什么在这种情况下会有所不同?此外,当它与默认的服务器级日志配置不同时,是否存在站点级日志格式的权威来源,而不是 UI(例如,在磁盘上某处的文件中)。以编程方式确定哪些站点日志偏离规范会非常方便。

【问题讨论】:

    标签: iis logging


    【解决方案1】:

    看了更多之后,似乎“扩展”日志比“标准”日志更新了很多,因此可能只是服务器级别的日志配置已更新,而旧的日志文件从未清理过.我怀疑有人在某个时候手动更新了服务器级配置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-05
      • 2017-07-17
      • 1970-01-01
      相关资源
      最近更新 更多