-
-
Save rightfold/76181b9cccb8fefe4b3c to your computer and use it in GitHub Desktop.
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
function colored(color, str) { | |
printf "%c[%dm" str "%c[0m\n", 27, color, 27; | |
} | |
/DEBUG/ { colored(37, $0); next } | |
/INFO/ { colored(34, $0); next } | |
/WARNING/ { colored(33, $0); next } | |
/ERROR/ { colored(31, $0); next } | |
/CRITICAL/ { colored(35, $0); next } | |
{ print; next } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment