Created
January 4, 2017 19:57
-
-
Save jaytaph/cea416b40ee851dfa38954d91cf5057d to your computer and use it in GitHub Desktop.
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
# Display Symfony2 logging with different coloring for different error levels | |
tail -f var/logs/*.log | gawk ' | |
/ERROR/ { print "\033[31m" $0 "\033[39;0m"; next; fflush();} | |
/CRITICAL/ { print "\033[41;33;1m" $0 "\033[39;0m"; next; fflush();} | |
/DEBUG/ { print "\033[34;1m" $0 "\033[39;0m"; next; fflush();} | |
/INFO/ { print "\033[32;1m" $0 "\033[39;0m"; next; fflush();} | |
$0; fflush(); | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment