Open ff6700 opened 3 months ago
This should do it:
# goaccess access.log --log-format='%h %^[%x] "%r" %s %b "%R" "%u" %^' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --tz=America/New_York --date-spec=min
Hello, I tried your commands in docker and linux
In linux
goaccess access.log --log-format='%h %^[%x] "%r" %s %b "%R" "%u" %^' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --time-format='%H:%M:%S' --tz=America/New_York --date-spec=min
In docker
docker run --name goaccess -v E:/Documents/code/nginx/php/php_site4/logs:/logs -p 8080:8080 allinurl/goaccess goaccess -f "/logs/1.test" --log-format='%h %^[%x] "%r" %s %b "%R" "%u" %^' --date-format='%d/%b/%Y:%H:%M:%S %z' --tz=America/New_York --date-spec=min
my log
127.0.0.1 - - [16/Jul/2024:16:23:40 +0800] "GET /index.php/Home/article/50 HTTP/1.1" 200 2307 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" "49.4.121.70"
113.215.189.246 - - [31/May/2024:03:24:42 +0800] "GET / HTTP/1.1" 200 84131 "-" "Mozilla/5.0 (Linux; Android 9; ASUS_X00TD; Flow) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/359.0.0.288 Mobile Safari/537.36" "-"
113.215.189.246 - - [31/May/2024:03:24:42 +0800] "GET / HTTP/1.1" 200 84131 "-" "Mozilla/5.0 (Linux; Android 9; ASUS_X00TD; Flow) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/359.0.0.288 Mobile Safari/537.36" "-"
113.215.189.246 - - [31/May/2024:03:24:42 +0800] "GET /favicon.ico?v=1.0.20220830 HTTP/1.1" 200 16958 "-" "Mozilla/5.0 (Linux; Android 9; ASUS_X00TD; Flow) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/359.0.0.288 Mobile Safari/537.36" "-"
113.215.189.246 - - [31/May/2024:03:24:42 +0800] "GET / HTTP/1.1" 200 84131 "-" "Mozilla/5.0 (Linux; Android 9; ASUS_X00TD; Flow) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/359.0.0.288 Mobile Safari/537.36" "-"
Please answer it again. Thank you very much!
Hi @ff6700
This is seems correct to me. So, about environment
variables LANG
and/or LC_TIME
?
Can be try something like :
LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8" docker run ...
Or check this variables into docker environment, once that it is running docker at W*nd0ws!
Hello. Please, help me!
docker run --name goaccess -v E:/Documents/code/nginx/php/php_site2/logs:/logs -v E:/Documents/code/nginx/php/php_site2/goaccess.conf:/etc/goaccess/goaccess.conf -p 8080:8080 allinurl/goaccess goaccess -f "/logs/1.test" -o /logs/report.html --real-time-html --config-file=/etc/goaccess/goaccess.conf --no-global-config --log-format='%h %^[%d:%t %^] "%r" %s %b "%{Referer}i" "%{User-Agent}i" "%^"' --date-format='%d/%b/%Y' --time-format='%H:%M:%S'
Log