Goaccess: Format error-please check your log / date / time format due to locale

Created on 9 Mar 2020  路  3Comments  路  Source: allinurl/goaccess

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

Token '09/Mar/2020' doesn't match specifier '%d'

 127.0.0.1 - - [09/Mar/2020:14:01:24 +0800] "GET /test/nginx_log.html HTTP/1.1" 200 331225 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36" "-"

No reason found馃あ

i18n lodattime format question

Most helpful comment

Please use the following, I'm guessing your log has English dates and your machine has a different locale.

LANG="en_US.UTF-8" bash -c 'goaccess access.log'

All 3 comments

Please use the following, I'm guessing your log has English dates and your machine has a different locale.

LANG="en_US.UTF-8" bash -c 'goaccess access.log'

@allinurl same issue on Windows platform with non-english locale. Can we somehow fix it without adding LANG and changing default location in Windows?

@Globulopolis goaccess uses strptime strftime to perform date stuff. The issue here is that the server is logging the date in English so I guess we could let the user set the locale as a command line option? which essentially LANG is doing.

Closing this, feel free to create a new issue if needed. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

canepa picture canepa  路  3Comments

g33kphr33k picture g33kphr33k  路  3Comments

SerenaAi picture SerenaAi  路  3Comments

Gill-Bates picture Gill-Bates  路  3Comments

olimpo88 picture olimpo88  路  3Comments