Last active
August 7, 2017 17:48
-
-
Save jcgregorio/75c994b4651d93245736 to your computer and use it in GitHub Desktop.
Colorizes glogs as they pass through.
This file contains 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/sh | |
# Since glog emits to stderr you'll need to run this through: | |
# 2>&1 | colorlogs | |
awk ' | |
/^I/ {print "\033[32m" $0 "\033[39m"} | |
/^W/ {print "\033[33m" $0 "\033[39m"} | |
/^E/ {print "\033[31m" $0 "\033[39m"} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment