Skip to content

Instantly share code, notes, and snippets.

@jdanbrown
Created March 28, 2017 22:14
Show Gist options
  • Save jdanbrown/a9b08fe9ec85f4b1bce9de1a8140ab02 to your computer and use it in GitHub Desktop.
Save jdanbrown/a9b08fe9ec85f4b1bce9de1a8140ab02 to your computer and use it in GitHub Desktop.
Configs for grc/grcat: https://github.com/garabik/grc
# ~/.grc/py
# Skip if not a log line
regexp=^(?!.*\b(CRITICAL|FATAL|ERROR|WARNING|WARN|INFO|DEBUG|TRACE)\b)
colours=none
count=stop
======
# Everything before msg: <level> <timestamp> <module> <msg>
regexp=^(\S+\s+){3}
colours=black
count=once
======
# Log levels
regexp=\b(CRITICAL|FATAL)\b
colours=bold magenta
count=more
======
regexp=\b(ERROR)\b
colours=bold red
count=more
======
regexp=\b(WARNING|WARN)\b
colours=bold yellow
count=more
======
regexp=\b(INFO)\b
colours=bold green
count=more
======
regexp=\b(DEBUG)\b
colours=bold blue
count=more
======
regexp=\b(TRACE)\b
colours=bold cyan
count=more
======
# Json-structured lines
# - TODO These get slow fast...
#regexp=\bnull\b
#colours=black
#count=more
#======
#regexp=^(?:[^:]*:){8}(.*)$
#colours=unchanged, white
#count=more
#======
#regexp=^(?:[^:]*:){8}(\{.*\})$
#colours=unchanged, cyan
#count=more
#======
regexp=\"[^"]*\"
colours=magenta
count=more
======
regexp=\"[^"]*\":
colours=blue
count=more
======
# So we don't have to worry about omitting final '======' line
regexp=never-match-rWzKDAfb5vjZJ8VCk54W
count=once
# vi: ft=conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment