Skip to content

Instantly share code, notes, and snippets.

@kesk
Last active February 10, 2016 12:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kesk/dc06c95a4b96ea287d0c to your computer and use it in GitHub Desktop.
Save kesk/dc06c95a4b96ea287d0c to your computer and use it in GitHub Desktop.
# Colourised tail output for
function colourtail() {
tail $* | sed \
-e 's/==>.*<==/\x1b[95m&\x1b[0m/' \
-e 's/.*\bDEBUG.*/\x1b[96m&\x1b[0m/' \
-e 's/.*\bWARN.*/\x1b[93m&\x1b[0m/' \
-e 's/.*\bERR.*/\x1b[91m&\x1b[0m/' \
-e 's/^[a-z.]\+\.[A-Za-z]*\(Exception\|Error\):.*/\x1b[93;41m&\x1b[0m/' \
-e 's/^[ \t]*\bat .*/\x1b[37m&\x1b[0m/i'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment