Last active
October 15, 2017 07:19
-
-
Save lukmdo/2004269 to your computer and use it in GitHub Desktop.
colorize gae logs filter
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
#!/usr/bin/env awk -f | |
# CCZE alternative (https://github.com/cornet/ccze) | |
BEGIN { | |
RED="\033[0;31m" | |
YELLOW="\033[0;33m" | |
GREEN="\033[0;32m" | |
BLUE="\033[0;34m" | |
LIGHT_RED="\033[1;31m" | |
LIGHT_GREEN="\033[1;32m" | |
WHITE="\033[1;37m" | |
LIGHT_GRAY="\033[0;37m" | |
COLOR_NONE="\033[0m" | |
} | |
/^INFO/ { print } | |
/^WARNING/ { sub("WARNING", YELLOW "WARNING" COLOR_NONE); print } | |
/^ERROR/ { sub("ERROR", LIGHT_RED "ERROR" COLOR_NONE); print } | |
/^CRITICAL/ { sub("CRITICAL", RED "CRITICAL" COLOR_NONE); print } | |
!/(INFO)|(WARNING)|(ERROR)|(CRITICAL)/ { print } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment