์๋ ํ์ธ์
๋ด ๋ก๊ทธ ํ์์ ๋ํ ๋์์ด ํ์ํฉ๋๋ค. ๋ค์์ uwsgi์์ ์์ฑํ ๋ก๊ทธ ํ์ผ์ ๋๋ค.
[pid: 22396|app: 0|req: 4924/39480] 193.151.131.150 () {40 vars in 741 bytes} [Sun Mar 6 22:56:30 2016] GET /tracks/14318/details => generated 2566 bytes in 45 msecs (HTTP/1.1 200) 7 headers in 241 bytes (2 switches on core 0)
ํ์ง๋ง goaccess
์์ ๋ณด๊ณ ์๋ฅผ ๋ฐ๊ณ ์ถ์ ๋ ์ด ์ค๋ฅ๊ฐ ๋ํ๋ฉ๋๋ค.
Fatal error has occurred
Error occured at: src/goaccess.c - main - 1017
Nothing valid to process. Verify your date/time/log format.
์ด๋ค ํ์์ ์ฌ์ฉํด์ผ ํฉ๋๊น?
๊ฒ์ํ ์ํ ๋ผ์ธ์ ๋ํด ๋ค์์ด ์๋ํด์ผ ํฉ๋๋ค.
log-format %^] %h %^[%^ %d %t %^] %m %U %^(%H %s) %^
date-format %b %d
time-format %H:%M:%S
์ด๋ป๊ฒ ์งํ๋๋์ง ์๋ ค์ฃผ์ธ์.
๋ซ์ต๋๋ค. ํ์ํ ๊ฒฝ์ฐ ์์ ๋กญ๊ฒ ๋ค์ ์ฝ๋๋ค.
๊ฒ์ํ ์ํ ๋ผ์ธ์ ๋ํด ๋ค์์ด ์๋ํด์ผ ํฉ๋๋ค.
log-format %^] %h %^[%^ %d %t %^] %m %U %^(%H %s) %^ date-format %b %d time-format %H:%M:%S
์ด๋ป๊ฒ ์งํ๋๋์ง ์๋ ค์ฃผ์ธ์.
์ด๊ฒ์ ๋๋ฅผ ์ํด ์๋ํ์ง ์์์ต๋๋ค. ์ค๋ฅ:
Parsed 1 linesproducing the following errors:
Token 'Feb' doesn't match specifier '%d'
Format Errors - Verify your log/date/time format
๋ด ๋ก๊ทธ ํ์ผ์ ํ์์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[pid: 2398|app: 0|req: 1075/3223] 128.237.158.26 () {44 vars in 634 bytes} [Mon Feb 18 16:36:03 2019] DELETE /api/apps/subscription => generated 24 bytes in 10 msecs (HTTP/1.1 200) 2 headers in 71 bytes (1 switches on core 0)
goaccess์์ ์๋ํ์ง๋ง ์ฌ์ ํ ๋ชจ๋ ์ธ๋ถ ์ฌํญ์ ๊ธฐ๋กํ๋ ๋ก๊ทธ ํ์์ ์ ์ํ ์ ์์ต๋๊น?
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๊ฒ์ํ ์ํ ๋ผ์ธ์ ๋ํด ๋ค์์ด ์๋ํด์ผ ํฉ๋๋ค.
์ด๋ป๊ฒ ์งํ๋๋์ง ์๋ ค์ฃผ์ธ์.