Skip to content

Instantly share code, notes, and snippets.

@nsollazzo
Created June 26, 2018 15:30
Show Gist options
  • Save nsollazzo/5ab146adff1b6a682a3e442d4318754a to your computer and use it in GitHub Desktop.
Save nsollazzo/5ab146adff1b6a682a3e442d4318754a to your computer and use it in GitHub Desktop.
Colored _log
# colored grep
alias grey-grep="GREP_COLOR='1;30' grep -E --color=always --line-buffered"
alias red-grep="GREP_COLOR='1;31' grep -E --color=always --line-buffered"
alias green-grep="GREP_COLOR='1;32' grep -E --color=always --line-buffered"
alias yellow-grep="GREP_COLOR='1;33' grep -E --color=always --line-buffered"
alias cyan-grep="GREP_COLOR='1;36' grep -E --color=always --line-buffered"
# colored log
alias logger='cyan-grep "\[.*\]|$" | yellow-grep "WARN|$" | red-grep "ERROR.*|FATAL.*|##|$" | green-grep "INFO|$"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment