Skip to content

Instantly share code, notes, and snippets.

@mmahadevan-okta
Created January 9, 2014 00:01
Show Gist options
  • Save mmahadevan-okta/8327082 to your computer and use it in GitHub Desktop.
Save mmahadevan-okta/8327082 to your computer and use it in GitHub Desktop.
Configuration file for grc # grc -c conf.log4j tail -f /usr/local/Cellar/tomcat/7.0.47/libexec/logs/catalina.out
# From http://fahdshariff.blogspot.ca/2011/04/highlighting-command-output-with.html
# 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 black
======
# 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