Add syntax highlighting for SysLog columns after time, for #4
This commit is contained in:
@@ -53,6 +53,7 @@ syn match logTime '\d\{2}:\d\{2}:\d\{2}\(.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\
|
|||||||
syn match logTimeZone '\(UTC\|PDT\|EDT\|GMT\|EST\|KST\)\( \d\{4}\)\?' contained
|
syn match logTimeZone '\(UTC\|PDT\|EDT\|GMT\|EST\|KST\)\( \d\{4}\)\?' contained
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" Entities
|
" Entities
|
||||||
"---------------------------------------------------------------------------
|
"---------------------------------------------------------------------------
|
||||||
syn match logUrl 'http[s]\?:\/\/[^\n|,; '"]\+'
|
syn match logUrl 'http[s]\?:\/\/[^\n|,; '"]\+'
|
||||||
@@ -66,6 +67,14 @@ syn match logFilePath '\<\w:\\[^\n|,; ()'"\]{}]\+'
|
|||||||
syn match logFilePath '\/\w[^\n|,; ()'"\]{}]\+'
|
syn match logFilePath '\/\w[^\n|,; ()'"\]{}]\+'
|
||||||
|
|
||||||
|
|
||||||
|
" Syslog Columns
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
" Syslog hostname, program and process number columns
|
||||||
|
" TODO: Match dashes, dots and underscores in hostname and program columns
|
||||||
|
syn match logSysColumns '\w\+ \w\+\(\[\d\+\]\)\?:' contains=logOperator,logSysProcess contained
|
||||||
|
syn match logSysProcess '\w\+\(\[\d\+\]\)\?:' contains=logOperator,logNumber,logBrackets contained
|
||||||
|
|
||||||
|
|
||||||
" XML Tags
|
" XML Tags
|
||||||
"---------------------------------------------------------------------------
|
"---------------------------------------------------------------------------
|
||||||
" Simplified matches, not accurate with the spec to avoid false positives
|
" Simplified matches, not accurate with the spec to avoid false positives
|
||||||
@@ -116,6 +125,9 @@ hi def link logIPV6 ErrorMsg
|
|||||||
hi def link logMacAddress Label
|
hi def link logMacAddress Label
|
||||||
hi def link logFilePath Conditional
|
hi def link logFilePath Conditional
|
||||||
|
|
||||||
|
hi def link logSysColumns Conditional
|
||||||
|
hi def link logSysProcess Include
|
||||||
|
|
||||||
hi def link logXmlHeader Function
|
hi def link logXmlHeader Function
|
||||||
hi def link logXmlDoctype Function
|
hi def link logXmlDoctype Function
|
||||||
hi def link logXmlTag Identifier
|
hi def link logXmlTag Identifier
|
||||||
|
|||||||
Reference in New Issue
Block a user