ステータスコードの 400 系と 500 系だけを tail する。
$9
の部分はログのフォーマットに合わせて調整が必要。
tail -f /path/to/nginx/logs/hoge.access.log | awk '$9~/[45]0[0-9]/ { print }'
More than 5 years have passed since last update.
ステータスコードの 400 系と 500 系だけを tail する。
$9
の部分はログのフォーマットに合わせて調整が必要。
tail -f /path/to/nginx/logs/hoge.access.log | awk '$9~/[45]0[0-9]/ { print }'
Register as a new user and use Qiita more conveniently