From 3b5174bb1d31621c9eef595c6c0cda0e827399f8 Mon Sep 17 00:00:00 2001 From: Benjamin Santos Date: Thu, 17 Jan 2019 18:38:06 -0500 Subject: [PATCH] Add syslog-syntax --- .gitmodules | 4 +++ assets/syntaxes/syslog-syntax | 1 + assets/syntaxes/syslog.sublime-syntax | 41 +++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 160000 assets/syntaxes/syslog-syntax create mode 100644 assets/syntaxes/syslog.sublime-syntax diff --git a/.gitmodules b/.gitmodules index cb941e3f..8a5ccbcf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -106,3 +106,7 @@ [submodule "assets/syntaxes/Assembly (ARM)"] path = assets/syntaxes/Assembly (ARM) url = https://github.com/tvi/Sublime-ARM-Assembly +[submodule "assets/syntaxes/syslog-syntax"] + path = assets/syntaxes/syslog-syntax + url = https://github.com/caos21/syslog-syntax.git + branch = master diff --git a/assets/syntaxes/syslog-syntax b/assets/syntaxes/syslog-syntax new file mode 160000 index 00000000..f9fe104a --- /dev/null +++ b/assets/syntaxes/syslog-syntax @@ -0,0 +1 @@ +Subproject commit f9fe104a60280d0ce8e1862f62477a7a9979e92a diff --git a/assets/syntaxes/syslog.sublime-syntax b/assets/syntaxes/syslog.sublime-syntax new file mode 100644 index 00000000..c49ea115 --- /dev/null +++ b/assets/syntaxes/syslog.sublime-syntax @@ -0,0 +1,41 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +name: syslog +file_extensions: + - log +scope: source.syslog +contexts: + main: + - match: \b(WAR|WARNING)\b + scope: invalid.deprecated + - match: (^(INVITE|ACK|PUBLISH|OPTIONS|CANCEL|BYE|SUBSCRIBE|NOTIFY|INFO|REFER|UPDATE|MESSAGE) sip.+$|SIP/2.0 180 Ringing|SIP/2.0 200 OK) + scope: variable.parameter + - match: '-----\>step.+$' + scope: support.function + - match: '.+\*{3,}.+' + scope: comment + - match: \b(INFO|VERBOSE)\b + scope: comment + - match: \bNOTICE\b + scope: support.class + - match: \b(ERR|ERROR)\b + scope: invalid.illegal + - match: '^\s*\[.+?\]' + scope: string.quote.single + - match: (--->|<---)( SIP read from | Transmitting \(NAT\) to | SIP transmit to).+$ + scope: comment.line + - match: \<— SIP read from .+ —\> + scope: constant.character + - match: \<— Transmitting \(NAT\) .+ —\> + scope: constant.numeric + - match: (SEND\:|recv\:).+\> + scope: constant.numeric + - match: ^Call-ID\:.+$ + scope: constant.numeric + - match: ^(User-Agent|Server)\:.+$ + scope: entity.name.function + - match: (AMI Send\:|AMI Recv\:|m\=).+ + scope: constant.language + - match: .*