Created
February 22, 2012 15:32
-
-
Save vjt/1885569 to your computer and use it in GitHub Desktop.
GRC (Generic Colouriser/Colorizer) configuration for Apache / nginx access logs
This file contains 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
# Configuration suitable to display Apache/nginx access logs | |
# Based on conf.proftpd by Pavol Domin | |
# Crafted by Marcello Barnaba <[email protected]> | |
# Get GRC at http://kassiopeia.juls.savba.sk/~garabik/software/grc.html | |
# | |
# ip number | |
regexp=^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} | |
colours=bold magenta | |
count=once | |
- | |
# everything in brackets | |
regexp=\[.+?\] | |
colours=cyan | |
count=once | |
- | |
# everything in "" | |
regexp=\".+?\" | |
colours=blue | |
count=more | |
- | |
# HTTP Method | |
regexp=(?:HEAD|GET|POST|PUT|DELETE) | |
colours=bold blue | |
count=once | |
- | |
# HTTP Path | |
regexp=\s/[^\s]+ | |
colours=bold green | |
count=once | |
- | |
# HTTP OK Status codes - from http://httpcats.herokuapp.com/ ;-) | |
regexp=\s(?:10[01]|20[02467]|30[0123457]) | |
colours=green | |
count=once | |
- | |
# HTTP Error status code - from the same source as above | |
regexp=\s(?:40[1-9]|41[1-8]|42[2-9]|431|444|450|50[2-9]|599) | |
colours=bold red | |
count=once | |
- | |
# Request byte size | |
regexp=\s(?!(?:10[01]|20[02467]|30[0123457])|(?:40[1-9]|41[1-8]|42[2-9]|431|444|450|50[2-9]|599))\d+ | |
colours=yellow | |
count=once |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment