Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义日志格式后,设置goaccess解析错误 #2749

Open
lovessong opened this issue Oct 29, 2024 · 1 comment
Open

自定义日志格式后,设置goaccess解析错误 #2749

lovessong opened this issue Oct 29, 2024 · 1 comment

Comments

@lovessong
Copy link

LogFormat "%h(%a) %t %T %u %H %m %>s %b "%{Referer}i" %v:%p%U "%{User-Agent}i"" combined
这是我apache设置的日志格式,参考日志为:211.87.126.137(211.87.126.137) [29/Oct/2024:00:00:05 +0800] 0 - HTTP/1.0 GET 200 2761 "-" bwc.xzit.edu.cn:80/7d/31/c4563a163121/page.htm "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
在goaccess.conf中设置的日志解析:log-format %h(%^) [%d:%t %^] %T %^ %H %m %s %b "%U"
解析出来的内容
微信截图_20241029164018
我的理解是data应该是url地址,为什么现在是这种情况

@allinurl
Copy link
Owner

请尝试一下这个,它应该有效:

# goaccess access.log --log-format='%h(%^) [%x] %T %^ %H %m %s %b "%R" %v:%^%U "%u"' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --tz=America/New_York --date-spec=min

2024-10-29-201556_618x301_scrot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants