Created
April 22, 2015 13:19
-
-
Save s-chizhik/1667da72218bbcae4e38 to your computer and use it in GitHub Desktop.
Add some colors to `tail` output(patterns in fact using for symfony logs)
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
#/bin/zsh | |
tail -f $1 \ | |
| GREP_COLORS='mt=01;32' egrep --color=always '[a-zA-Z]*\.DEBUG|' \ | |
| GREP_COLORS='mt=01;34' egrep --color=always '[a-zA-Z]*\.INFO|' \ | |
| GREP_COLORS='mt=01;33' egrep --color=always '[a-zA-Z]*\.WARNING|' \ | |
| GREP_COLORS='mt=01;39;41;' egrep --color=always '[a-zA-Z]*\.CRITICAL|'\ | |
| GREP_COLORS='mt=01;31' egrep --color=always '[a-zA-Z]*\.ERROR|' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment