Apache2 ForensicLog 时间戳

Apache2 ForensicLog 时间戳

我正在使用 apache2,并通过下面的指令启用了 ForensicLog。

ForensicLog ${APACHE_LOG_DIR}/mysite.com.forensic.log

当我检查“mysite.com.forensic.log”文件时,每行都没有时间戳。它没有存储每个请求的时间戳。有没有办法在日志中包含时间戳?日志看起来像这样。

+SOME_MIXED_ID|GET /robots.txt HTTP/1.1|Host:HERE.SOME.IP.ADDR|User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36

答案1

它不存储时间戳。根据文档

你可以与正常日志(可能包括时间戳)关联,方法是使用%{forensic-id}n用于记录的格式字符串。这将为您提供时间戳。

相关内容