Created
August 29, 2019 17:46
-
-
Save neodevelop/4d028ab5d6c4acb426d4efd03250006d to your computer and use it in GitHub Desktop.
Colorize the log!!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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