所以基本的问题,但我似乎无法find一个简单的答案。
如何在我的apache日志中loggingdate/时间以获得unix时间戳记(自纪元以来的秒数)。
我有默认的LogFormat为:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
Apache模块mod_log_config :
%{format}t The time, in the form given by format, which should be in strftime(3) format. (potentially localized)
例:
LogFormat "%v %h %l %u %{%s}t \"%r\" %>s %b" vhost_common CustomLog /var/log/test vhost_common
日志:
127.0.1.1 127.0.0.1 - - 1309405372 "GET / HTTP/1.0" 200 177