Last active
May 1, 2022 15:03
-
-
Save amostsai/d389538a4695043ff917615ec9d89383 to your computer and use it in GitHub Desktop.
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
| # From http://fahdshariff.blogspot.ca/2011/04/highlighting-command-output-with.html 加以修改 | |
| # 1. sudo apt install grc | |
| # 2. 將本設定檔存到 ~/.grc/conf.tail (要自建.grc資料夾) | |
| # 3. grc -c conf.tail tail -f webapp/website.log | |
| # this configuration file is suitable for displaying log files | |
| #errors | |
| regexp=^.*(ERROR|Error|Exception).*$ | |
| colours=bold red | |
| ====== | |
| #stack trace | |
| regexp=^\s+at [^:]*:\d*\)$ | |
| colours=red | |
| ====== | |
| regexp=^.*(FATAL|Fatal).*$ | |
| colours=on_red | |
| ====== | |
| regexp=^.*(WARNING|Warning).*$ | |
| colours=bold yellow | |
| ====== | |
| regexp=^.*(DEBUG|Debug).*$ | |
| colours=bold green | |
| ====== | |
| # this is a time | |
| regexp=[^\d]*\d\d:\d\d:\d\d[\.,]{0,1}\d{0,1}\d{0,1}\d{0,1} | |
| colours=bold blue | |
| count=once | |
| ====== | |
| # ip number | |
| regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} | |
| colours=bold magenta | |
| count=more |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment