Skip to content

Instantly share code, notes, and snippets.

@neodevelop
Created August 29, 2019 17:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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