Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Colorize the log!!!
tail -f faltas_suplencias.log | awk '
/info/ {print "\033[32m" $0 "\033[39m"}
/debug/ {print "\033[34m" $0 "\033[39m"}
/warn/ {print "\033[33m" $0 "\033[39m"}
/error/ {print "\033[31m" $0 "\033[39m"}
'
tail -f ecto_sql.log | awk '
/SELECT/ {print "\033[32m" $0 "\033[39m"}
/debug/ {print "\033[32m" $0 "\033[39m"}
/INSERT/ {print "\033[34m" $0 "\033[39m"}
/UPDATE/ {print "\033[33m" $0 "\033[39m"}
/error/ {print "\033[31m" $0 "\033[39m"}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment