简体   繁体   English

在goaccess中修改格式

[英]Modifying format in goaccess

I must use goaccess on a log that looks like this:我必须在如下所示的日志上使用 goaccess:

176.6.24.77 - - [Nov 05 2020 23:33:42] "GET /fontawesome/css/all.min.css HTTP/1.1" 200 28 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"

I'm trying to use the log-format option and I'm using the following:我正在尝试使用 log-format 选项,我正在使用以下内容:

goaccess --log-format=COMBINED --log-format="%^[%b %d %Y %T]" access.log

and I get the following error:我收到以下错误:

Token '04' doesn't match specifier '%d'

But 04 IS supposed to match %d, no ?但是 04 应该匹配 %d,不是吗? I'm getting confused here我在这里感到困惑

这在 v1.4 中对我有用

goaccess access.log --log-format='%h %^[%d %t] "%r" %s %b "%R" "%u"' --date-format='%b %d %Y' --time-format=%T

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM