on master help sign in
Merge pull request #1793 from scop/syslog-improvements

Syslog highlight improvements

commitf8498b260b0dc82e12e0486dcb2d86d039cac54e authorKeith Hall <keith-hall@users.noreply.github.com> dateThu 12 Aug 2021, 09:49 (5 years ago) parent89217e079f0858
4 files changed+9−2
CHANGELOG.md+1 assets/syntaxes/02_Extra/syslog.sublime-syntax+2−2 tests/syntax-tests/highlighted/Syslog/example.syslog+3 tests/syntax-tests/source/Syslog/example.syslog+3
CHANGELOG.md+1
@@ -19,6 +19,7 @@
1919- HTTP Requests and Responses, see #1748 (@keith-hall)
2020- LLVM, see #1777 (@ioncodes)
2121- Highlight for `vimrc` and `gvimrc` files, see #1763 (@SuperSandro2000)
22+- Syslog highlighting improvements, see #1793 (@scop)
2223
2324
2425## New themes
assets/syntaxes/02_Extra/syslog.sublime-syntax+2−2
@@ -16,11 +16,11 @@ contexts:
1616 - match: ^
1717 push: text
1818 loghost:
19− - match: '[\w-]+'
19+ - match: '[\w:.-]+'
2020 scope: entity.other.attribute-name.loghost.syslog
2121 set: process
2222 process:
23− - match: ([\w-]+)(?:(\[)(\d+)(\]))?(:)
23+ - match: ([\w.-]+)(?:(\[)(\d+)(\]))?(:)
2424 captures:
2525 1: support.function.process.syslog
2626 2: punctuation.separator.pid.begin.syslog
tests/syntax-tests/highlighted/Syslog/example.syslog+3
@@ -9,3 +9,6 @@
99Apr 4 09:30:01 hostname-here CRON[89278]: (root) CMD ([ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi)
1010Apr 4 16:32:07 hostname-here NetworkManager[740]: <info> [1617629527.1101] manager: NetworkManager state is now CONNECTED_GLOBAL
1111Apr 4 22:00:45 hostname-here dbus-daemon[1094]: [session uid=1000 pid=1094] Successfully activated service 'io.github.celluloid_player.Celluloid'
12+Aug 11 13:29:06 hostname-here insomnia_insomnia.desktop[142666]: 13:29:06.316 › [updater] Updater not running platform=linux dev=false
13+Aug 11 13:36:34 192.168.220.5 nginx: 2021/08/11 13:36:34 [debug] 2031#2031: epoll add event: fd:6 op:1 ev:00002001
14+Aug 11 21:31:08 ::1 nginx: 2021/08/11 21:31:08 [debug] 760831#760831: epoll add event: fd:6 op:1 ev:10000001
tests/syntax-tests/source/Syslog/example.syslog+3
@@ -9,3 +9,6 @@ Apr 4 00:06:29 hostname-here ntpd[952]: receive: Unexpected origin timestamp 0x
99Apr 4 09:30:01 hostname-here CRON[89278]: (root) CMD ([ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi)
1010Apr 4 16:32:07 hostname-here NetworkManager[740]: <info> [1617629527.1101] manager: NetworkManager state is now CONNECTED_GLOBAL
1111Apr 4 22:00:45 hostname-here dbus-daemon[1094]: [session uid=1000 pid=1094] Successfully activated service 'io.github.celluloid_player.Celluloid'
12+Aug 11 13:29:06 hostname-here insomnia_insomnia.desktop[142666]: 13:29:06.316 › [updater] Updater not running platform=linux dev=false
13+Aug 11 13:36:34 192.168.220.5 nginx: 2021/08/11 13:36:34 [debug] 2031#2031: epoll add event: fd:6 op:1 ev:00002001
14+Aug 11 21:31:08 ::1 nginx: 2021/08/11 21:31:08 [debug] 760831#760831: epoll add event: fd:6 op:1 ev:10000001