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

Token '23/Nov/2019' doesn't match specifier '%d' #1612

Closed
destinywang opened this issue Nov 23, 2019 · 3 comments
Closed

Token '23/Nov/2019' doesn't match specifier '%d' #1612

destinywang opened this issue Nov 23, 2019 · 3 comments

Comments

@destinywang
Copy link

nginx: 1.16.1

goaccess: 1.3_1

image

nginx access log format:

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

nginx access log example:

127.0.0.1 - - [23/Nov/2019:11:45:04 +0800] "GET /hadoop-project-dist/hadoop-hdfs/WebHDFS.html HTTP/1.0" 200 125430 "http://localhost:9000/hadoop-hdfs-httpfs/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" "127.0.0.1"

error message

$ /usr/local/Cellar/goaccess/1.3_1/bin/goaccess logs/access.log -o /Users/destiny/dev/nginx/logs/report.html --time-format='%T' --date-format='%d/%b/%Y' --log-format='%h - %^ [%d:%t %^] "%r" %s %b "%R" "%u" "%^"'

Token '23/Nov/2019' doesn't match specifier '%d'
@allinurl
Copy link
Owner

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'

@majkelo
Copy link

majkelo commented Feb 13, 2020

sometimes you have to use a bit different command:
LC_ALL="en_US.UTF-8" bash -c 'goaccess access.log --log-format=COMBINED'

explained in:
#1669

@allinurl
Copy link
Owner

@majkelo Thanks for pointing that out. Closing this. @destinywang feel free to reopen it if needed.

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

3 participants