allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.12k stars 1.1k forks source link

Issue with custom date/time/log format for custom logs (syslog date/time) #2184

Closed mgrapiniak closed 2 years ago

mgrapiniak commented 2 years ago

Hi!

I do have a custom log file with the following: 1.23.81.34 - - [Wed, 15 Sep 2021 09:59:09 GMT] "GET /some/url/home.html HTTP/1.1" 200 70749 "-" "Amazon CloudFront"

Having difficulties to set appropriate parameters in date/time/log format. Changed combined date format to following:

%a, %d %b %Y

But still unable to parse. Any hints on this one?

allinurl commented 2 years ago

This should work:

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