Last active
June 12, 2023 18:55
-
-
Save masonwan/7956055 to your computer and use it in GitHub Desktop.
Print out Tomcat log file "catalina.out" with color
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
tail -200 catalina.out | ack-grep --flush --passthru --color --color-match=red "^.*ERROR.*" | ack-grep --flush --passthru --color --color-match=green "^.*DEBUG.*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here are my contributions, based on @ElMesa's fork:
https://gist.github.com/tfga/26c22026d9aeb9c0df3db2b39ccfbf88
Refactored the code to use functions, so now the main code looks like this:
You can colorize the whole line or just "the word" / regex match (e.g.
ERROR
,SEVERE
).Made it a pipe: