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

macOS 10.15 nginx access_log Token doesn't match specifier '%d #1571

Artgerry opened this issue Oct 16, 2019 · 2 comments


Copy link

@Artgerry Artgerry commented Oct 16, 2019


I keep on getting this error no matter what I do:

Token '16/Oct/2019' doesn't match specifier '%d'

The command I am using is:
goaccess -o ../html/report.html --real-time-html --time-format='%H:%M:%S' --date-format='%d/%b/%Y' --log-format=COMMON

I tried other methods and it was the same error.example:
goaccess -o ../html/report.html --real-time-html --time-format='%H:%M:%S' --date-format='%d/%b/%Y' --log-format='%h %^[%d:%t %^] "%r" %s %b "%R" "%u"'

An example log file line: - - [16/Oct/2019:10:43:04 +0800] "GET /report.html HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36" "-"

In addition,the output of date my terminal is :
2019年10月16日 星期三 11时04分36秒 CST

Thanks in advance ! :)


This comment has been minimized.

Copy link

@allinurl allinurl commented Oct 17, 2019

Looks like your access log has english dates while your system locale is set to Chinese.

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

This comment has been minimized.

Copy link

@Artgerry Artgerry commented Oct 17, 2019

it work!
I added itLANG="en_US.UTF-8" in front of the command line.

The command I am using is:
LANG="en_US.UTF-8" bash -c 'goaccess -o ../html/report.html --real-time-html --time-format='%H:%M:%S' --date-format='%d/%b/%Y' --log-format=COMMON'

Maybe the system language affects the match

anyway,Thank you very much!

@Artgerry Artgerry closed this Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.