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

Error in Custom Log Format with TZ #2627

Open
npedro3 opened this issue Feb 6, 2024 · 1 comment
Open

Error in Custom Log Format with TZ #2627

npedro3 opened this issue Feb 6, 2024 · 1 comment

Comments

@npedro3
Copy link

npedro3 commented Feb 6, 2024

I have this acess.log file


"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET /home/ HTTP/1.1" 200 4379
"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET / HTTP/1.1" 200 4626
"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET /home/ HTTP/1.1" 200 4379
"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET /home/w3.css HTTP/1.1" 200 38114
"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET /home/w3-theme.css HTTP/1.1" 200 1349
"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET /home/build.js HTTP/1.1" 200 812
"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET /home/images/logo_WP10_whitestroke.png HTTP/1.1" 200 3587
"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET /home/webresources/tools/build HTTP/1.1" 200 193
"127.0.0.1" "NULL-AUTH-USER" "05/Feb/2024:11:56:17 +0000" "GET /home/webresources/tools/cacheStatus HTTP/1.1" 200 34

and i am try to run the GoAccess using this formats but not working
time-format %H:%M:%S %z
date-format %d/%b/%Y
log-format "%h" "%^" "%d:%t" "%m %U %H" %s %b
Can someone please help me find the right format?

@allinurl
Copy link
Owner

Apologies for the wait! This should do the trick. Keep me posted on how it goes!

goaccess access.log --log-format='"%h" "%e" "%x" "%r" %s %b' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --date-spec=min --tz=America/New_York

2024-02-09-180418_617x473_scrot

@allinurl allinurl changed the title Error in Format Log Error in Custom Log Format with TZ Feb 10, 2024
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

2 participants