Skip to content

Instantly share code, notes, and snippets.

@tinker1987
Forked from kartikshah/tail-color.sh
Last active September 11, 2017 08:36
Show Gist options
  • Save tinker1987/7a7f4fa9a9f5b5ddbcb6a41223b75a8a to your computer and use it in GitHub Desktop.
Save tinker1987/7a7f4fa9a9f5b5ddbcb6a41223b75a8a to your computer and use it in GitHub Desktop.

Revisions

  1. tinker1987 revised this gist Sep 11, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions tail-color.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    $tail -100f /var/log/applications/application.log | awk '
    tail -100f var/logs/dev.log | awk '
    /INFO/ {print "\033[32m" $0 "\033[39m"}
    /Exception/ {print "\033[31m" $0 "\033[39m"}
    /ERROR|Exception/ {print "\033[31m" $0 "\033[39m"}
    /DEBUG/ {print "\033[33m" $0 "\033[39m"}
    '
  2. @kartikshah kartikshah created this gist Feb 17, 2012.
    4 changes: 4 additions & 0 deletions tail-color.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    $tail -100f /var/log/applications/application.log | awk '
    /INFO/ {print "\033[32m" $0 "\033[39m"}
    /Exception/ {print "\033[31m" $0 "\033[39m"}
    '