nginx的Goaccess日志格式

时间:2016-10-12 10:28:29

标签: logging nginx goaccess

这是我的日志

180.76.15.143 - - [09/Oct/2016:07:43:04 +0700] "GET / HTTP/1.1" 301 193 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.htm$
180.76.15.160 - - [09/Oct/2016:07:44:15 +0700] "GET / HTTP/1.1" 301 193 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.htm$
180.76.15.154 - - [09/Oct/2016:08:39:45 +0700] "GET / HTTP/1.1" 301 193 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.htm$

我使用这些格式但不起作用

time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h - %^ [%d:%t %^]  "%r" %s %b "%R" "%u" %T "%^"

谢谢。

1 个答案:

答案 0 :(得分:0)

NCSA组合日志格式:

time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"