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.38k stars 1.11k forks source link

Token for '%b' specifier is NULL #2267

Closed snowlyg closed 2 years ago

snowlyg commented 2 years ago

Example log entries: 192.168.112.89 - - [22/Jan/2022:00:00:01 +0800] "GET /app/bed/message/unread?admId=18413&X-ARR-CACHE-HIT=0&X-ARR-LOG-ID=ed1bf584-5da6-4010-9435-7ce111a75131&SERVER-STATUS=200 HTTP/1.1" 200 192

Goaccess version: GoAccess - version 1.5.4 - Jan 20 2022 11:47:38

So I start goaccess via: LANG='zh_CN.UTF-8' LC_TIME='en_US.UTF-8' goaccess goaccess.log -a -o report.html --log-format='%h %^[%d:%t %^] "%r" %s %b "%R" "%u"" "%u"' --date-format=%d/%b/%Y --time-format=%H:%M:%S

And i get a fails msg about Token for '%b' specifier is NULL.

If i chang %h %^[%d:%t %^] "%r" %s %b "%R" "%u"" "%u" to %h %^[%d:%t %^] "%r" %s "%R" "%u"" "%u" it's work wall.

So it's a bug for this version ?

allinurl commented 2 years ago

Please try using:

goaccess --log-format=COMMON access.log
snowlyg commented 2 years ago

Please try using:

goaccess --log-format=COMMON access.log

Thanks, It's working.