Include structured JSON log color

This commit is contained in:
Renato Lima 2021-09-24 21:28:38 -03:00
parent f4a579e08d
commit 737d8eab63
1 changed files with 48 additions and 0 deletions

48
colourfiles/conf.json Normal file
View File

@ -0,0 +1,48 @@
# this configuration file is suitable for displaying structured json logs
# Reference: http://kassiopeia.juls.savba.sk/~garabik/software/grc/README.txt
# attribute name
regexp=(?<=[\{,])\".*?\"(?=\:)(?!,)
colours=bold white
count=more
======
# attribute value (string)
regexp=(?<=\:\").*?[^\\](?=\")
colours=green
count=more
======
# attribute value (number)
regexp=(?<=\:)[-+]?[0-9]*\.?[0-9]+
colours=bold magenta
count=more
======
# attribute value (date)
regexp=\"\d{4}-[01]\d-[0-3]\d.+?\"
colours=cyan
count=more
======
# special attribute (error)
regexp=(?<=[\{,]\")err.*?\"\:\".*?[^\\](?=\")
colours=bold red
count=more
=====
# special attribute (error level)
regexp=(?<=[\{,]\"level"\:)(\"(err.*?|fatal|ftl)\")
colours=bold on_red
count=once
=====
# special attribute (warning level)
regexp=(?<=[\{,]\"level"\:)(\"(warn.*?|wrn)\")
colours=on_yellow black
count=once
=====
# useful delimiters
regexp=([\[\]\{\}\(\)])
colours=dark white
count=more
=====
# useful delimiters
regexp=(?<=\"),(?=\")
colours=dark white
count=more