-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
log.tmLanguage
289 lines (225 loc) · 6.27 KB
/
log.tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>scopeName</key>
<string>text.log</string>
<key>fileTypes</key>
<array>
<string>log</string>
</array>
<key>name</key>
<string>Log file</string>
<key>patterns</key>
<array>
<!-- Log levels -->
<!-- Trace/Verbose -->
<dict>
<key>match</key>
<string>\b(Trace)\b:</string>
<key>name</key>
<string>comment log.verbose</string>
</dict>
<!-- Serilog VERBOSE -->
<dict>
<key>match</key>
<string>(?i)\[(verbose|verb|vrb|vb|v)\]</string>
<key>name</key>
<string>comment log.verbose</string>
</dict>
<!-- Android logcat Verbose -->
<dict>
<key>match</key>
<string>(?<=^[\s\d\p]*)\bV\b</string>
<key>name</key>
<string>comment log.verbose</string>
</dict>
<!-- DEBUG -->
<dict>
<key>match</key>
<string>\b(DEBUG|Debug)\b|(?i)\b(debug)\:</string>
<key>name</key>
<string>markup.changed log.debug</string>
</dict>
<!-- Serilog DEBUG -->
<dict>
<key>match</key>
<string>(?i)\[(debug|dbug|dbg|de|d)\]</string>
<key>name</key>
<string>markup.changed log.debug</string>
</dict>
<!-- Android logcat Debug -->
<dict>
<key>match</key>
<string>(?<=^[\s\d\p]*)\bD\b</string>
<key>name</key>
<string>markup.changed log.debug</string>
</dict>
<!-- INFO -->
<dict>
<key>match</key>
<string>\b(HINT|INFO|INFORMATION|Info|NOTICE|II)\b|(?i)\b(info|information)\:</string>
<key>name</key>
<string>markup.inserted log.info</string>
</dict>
<!-- Serilog INFO -->
<dict>
<key>match</key>
<string>(?i)\[(information|info|inf|in|i)\]</string>
<key>name</key>
<string>markup.inserted log.info</string>
</dict>
<!-- Android logcat Info -->
<dict>
<key>match</key>
<string>(?<=^[\s\d\p]*)\bI\b</string>
<key>name</key>
<string>markup.inserted log.info</string>
</dict>
<!-- WARN -->
<dict>
<key>match</key>
<string>\b(WARNING|WARN|Warn|WW)\b|(?i)\b(warning)\:</string>
<key>name</key>
<string>markup.deleted log.warning</string>
</dict>
<!-- Serilog WARN -->
<dict>
<key>match</key>
<string>(?i)\[(warning|warn|wrn|wn|w)\]</string>
<key>name</key>
<string>markup.deleted log.warning</string>
</dict>
<!-- Android logcat Warning -->
<dict>
<key>match</key>
<string>(?<=^[\s\d\p]*)\bW\b</string>
<key>name</key>
<string>markup.deleted log.warning</string>
</dict>
<!-- ERROR -->
<dict>
<key>match</key>
<string>\b(ALERT|CRITICAL|EMERGENCY|ERROR|FAILURE|FAIL|Fatal|FATAL|Error|EE)\b|(?i)\b(error)\:</string>
<key>name</key>
<string>string.regexp, strong log.error</string>
</dict>
<!-- Serilog ERROR -->
<dict>
<key>match</key>
<string>(?i)\[(error|eror|err|er|e|fatal|fatl|ftl|fa|f)\]</string>
<key>name</key>
<string>string.regexp, strong log.error</string>
</dict>
<!-- Android logcat Error -->
<dict>
<key>match</key>
<string>(?<=^[\s\d\p]*)\bE\b</string>
<key>name</key>
<string>string.regexp, strong log.error</string>
</dict>
<!-- ISO dates ("2016-08-23") -->
<dict>
<key>match</key>
<string>\b\d{4}-\d{2}-\d{2}(T|\b)</string>
<key>name</key>
<string>comment log.date</string>
</dict>
<!-- Culture specific dates ("23/08/2016", "23.08.2016") -->
<dict>
<key>match</key>
<string>(?<=(^|\s))\d{2}[^\w\s]\d{2}[^\w\s]\d{4}\b</string>
<key>name</key>
<string>comment log.date</string>
</dict>
<!-- Clock times with optional timezone ("09:13:16", "09:13:16.323", "09:13:16+01:00") -->
<dict>
<key>match</key>
<string>\d{1,2}:\d{2}(:\d{2}([.,]\d{1,})?)?(Z| ?[+-]\d{1,2}:\d{2})?\b</string>
<key>name</key>
<string>comment log.date</string>
</dict>
<!-- Git commit hashes of length 40, 10 or 7 -->
<dict>
<key>match</key>
<string>\b([0-9a-fA-F]{40}|[0-9a-fA-F]{10}|[0-9a-fA-F]{7})\b</string>
<key>name</key>
<string>constant.language</string>
</dict>
<!-- Guids -->
<dict>
<key>match</key>
<string>\b[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}\b</string>
<key>name</key>
<string>constant.language log.constant</string>
</dict>
<!-- MAC addresses: 89:A1:23:45:AB:C0, fde8:e767:269c:0:9425:3477:7c8f:7f1a -->
<dict>
<key>match</key>
<string>\b([0-9a-fA-F]{2,}[:-])+[0-9a-fA-F]{2,}+\b</string>
<key>name</key>
<string>constant.language log.constant</string>
</dict>
<!-- Constants -->
<dict>
<key>match</key>
<string>\b([0-9]+|true|false|null)\b</string>
<key>name</key>
<string>constant.language log.constant</string>
</dict>
<!-- Hex Constants -->
<dict>
<key>match</key>
<string>\b(0x[a-fA-F0-9]+)\b</string>
<key>name</key>
<string>constant.language log.constant</string>
</dict>
<!-- String constants -->
<dict>
<key>match</key>
<string>"[^"]*"</string>
<key>name</key>
<string>string log.string</string>
</dict>
<dict>
<key>match</key>
<string>(?<![\w])'[^']*'</string>
<key>name</key>
<string>string log.string</string>
</dict>
<!-- Exception type names -->
<dict>
<key>match</key>
<string>\b([a-zA-Z.]*Exception)\b</string>
<key>name</key>
<string>string.regexp, emphasis log.exceptiontype</string>
</dict>
<!-- Colorize rows of exception call stacks -->
<dict>
<key>begin</key>
<string>^[\t ]*at[\t ]</string>
<key>end</key>
<string>$</string>
<key>name</key>
<string>string.key, emphasis log.exception</string>
</dict>
<!-- Match Urls -->
<dict>
<key>match</key>
<string>\b[a-z]+://\S+\b/?</string>
<key>name</key>
<string>constant.language log.constant</string>
</dict>
<!-- Match character and . sequences (such as namespaces)
as well as file names and extensions (e.g. bar.txt) -->
<dict>
<key>match</key>
<string>(?<![\w/\\])([\w-]+\.)+([\w-])+(?![\w/\\])</string>
<key>name</key>
<string>constant.language log.constant</string>
</dict>
</array>
<key>uuid</key>
<string>E81BB6AB-CAC7-4C27-9A79-4137A4693EBD</string>
</dict>
</plist>