Files
go-highlite/syntax_files/server-log.yaml
T
Jesse Portnoy 571529568c - Revised code example
- Added new lexers and revised existing
2023-07-16 23:44:37 +01:00

16 lines
542 B
YAML

filetype: serverlog
detect:
filename: "httpd.*\\.log||vhosts\\\\.*\\.log|apache.*\\.log|nginx.*\\.log"
rules:
- constant.number: "(\\[[^]]+\\])"
- preproc: "([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"
- preproc: "\\\\."
- preproc: "(\\[(error|warning|info|warn)\\])"
- constant.specialChar: "((GET|POST|HEAD)\\ [^\\ ]+)"
- comment: "(referer\\: .*)"
- statement: "[[:space:]]([0-9~:.]{2,}[-+:.0-9a-z~]+)[[:space:]]"
- type: "(Mozilla|Chrome|Safari|AppleWebKit|Linux x86_64|Gecko|Windows|Mac)"