Nginx color lines

Show different colors for different lines based on http status

tail -f /var/log/nginx/access.log | awk ' / 200 / {print "\033[32m" $0 "\033[39m"} / 500 / {print "\033[31m" $0 "\033[39m"} / 302 / {print "\033[33m" $0 "\033[39m"} '

Vytvorené 3y | 19. 6. 2021, 11:00:35


Ak chcete pridať komentár, prihláste sa