【问题标题】:Apache Log Format adds quotes and backslashApache 日志格式添加引号和反斜杠
【发布时间】:2012-12-03 17:09:38
【问题描述】:

httpd.conf 中,我将 LogFormat 设置为:

LogFormat "%t %{client-ip}i \"%{X-Forwarded-For}i\" %l %u \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" sessid=%{SESSID}C **guid=%{guid}C** req_guid=%{X-Hcom-Info}o" netscaler

问题在于记录 guid cookie 值的方式: guid=\"357ceacc-d2fb-458d-bc53-c6d1384d47dd:1107014198\"

它在 guid 周围添加了 \" \" - 可能是因为 :1107014198 部分。

我如何让 apache 将 guid 记录为: guid=357ceacc-d2fb-458d-bc53-c6d1384d47dd:1107014198 即没有 \" \"

【问题讨论】:

    标签: apache logging


    【解决方案1】:

    添加 \"\" 字符的可能不是 Apache。 guid 变量可能已经有了这些。您需要弄清楚 guid 变量的设置位置,并确保当时没有引用它。

    【讨论】:

      猜你喜欢
      • 2019-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多