package tm-grammars

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file tm_grammar_log.ml

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
let lang_id = "log"
let json = {json|{
  "displayName": "Log file",
  "fileTypes": [
    "log"
  ],
  "name": "log",
  "patterns": [
    {
      "match": "\\b([Tt]race|TRACE)\\b:?",
      "name": "comment log.verbose"
    },
    {
      "match": "(?i)\\[(v(?:erbose|erb|rb|b?))]",
      "name": "comment log.verbose"
    },
    {
      "match": "(?<=^[p\\s\\d]*)\\bV\\b",
      "name": "comment log.verbose"
    },
    {
      "match": "\\b(D(?:EBUG|ebug))\\b|(?i)\\b(debug):",
      "name": "markup.changed log.debug"
    },
    {
      "match": "(?i)\\[(d(?:ebug|bug|bg|e?))]",
      "name": "markup.changed log.debug"
    },
    {
      "match": "(?<=^[p\\s\\d]*)\\bD\\b",
      "name": "markup.changed log.debug"
    },
    {
      "match": "\\b(HINT|INFO|INFORMATION|Info|NOTICE|II)\\b|(?i)\\b(info(?:|rmation)):",
      "name": "markup.inserted log.info"
    },
    {
      "match": "(?i)\\[(i(?:nformation|nfo?|n?))]",
      "name": "markup.inserted log.info"
    },
    {
      "match": "(?<=^[p\\s\\d]*)\\bI\\b",
      "name": "markup.inserted log.info"
    },
    {
      "match": "\\b(W(?:ARNING|ARN|arn|W))\\b|(?i)\\b(warning):",
      "name": "markup.deleted log.warning"
    },
    {
      "match": "(?i)\\[(w(?:arning|arn|rn|n?))]",
      "name": "markup.deleted log.warning"
    },
    {
      "match": "(?<=^[p\\s\\d]*)\\bW\\b",
      "name": "markup.deleted log.warning"
    },
    {
      "match": "\\b(ALERT|CRITICAL|EMERGENCY|ERROR|FAILURE|FAIL|Fatal|FATAL|Error|EE)\\b|(?i)\\b(error):",
      "name": "string.regexp, strong log.error"
    },
    {
      "match": "(?i)\\[(error|eror|err?|e|fatal|fatl|ftl|fa?)]",
      "name": "string.regexp, strong log.error"
    },
    {
      "match": "(?<=^[p\\s\\d]*)\\bE\\b",
      "name": "string.regexp, strong log.error"
    },
    {
      "match": "\\b\\d{4}-\\d{2}-\\d{2}(?=T|\\b)",
      "name": "comment log.date"
    },
    {
      "match": "(?<=(^|\\s))\\d{2}[^\\w\\s]\\d{2}[^\\w\\s]\\d{4}\\b",
      "name": "comment log.date"
    },
    {
      "match": "T?\\d{1,2}:\\d{2}(:\\d{2}([,.]\\d+)?)?(Z| ?[-+]\\d{1,2}:\\d{2})?\\b",
      "name": "comment log.date"
    },
    {
      "match": "T\\d{2}\\d{2}(\\d{2}([,.]\\d+)?)?(Z| ?[-+]\\d{1,2}\\d{2})?\\b",
      "name": "comment log.date"
    },
    {
      "match": "\\b(\\h{40}|\\h{10}|\\h{7})\\b",
      "name": "constant.language"
    },
    {
      "match": "\\b\\h{8}-?(\\h{4}-?){3}\\h{12}\\b",
      "name": "constant.language log.constant"
    },
    {
      "match": "\\b(\\h{2,}[-:])+\\h{2,}+\\b",
      "name": "constant.language log.constant"
    },
    {
      "match": "\\b([0-9]+|true|false|null)\\b",
      "name": "constant.language log.constant"
    },
    {
      "match": "\\b(0x\\h+)\\b",
      "name": "constant.language log.constant"
    },
    {
      "match": "\"[^\"]*\"",
      "name": "string log.string"
    },
    {
      "match": "(?<!\\w)'[^']*'",
      "name": "string log.string"
    },
    {
      "match": "\\b([.A-Za-z]*Exception)\\b",
      "name": "string.regexp, emphasis log.exceptiontype"
    },
    {
      "begin": "^[\\t ]*at[\\t ]",
      "end": "$",
      "name": "string.key, emphasis log.exception"
    },
    {
      "match": "\\b[a-z]+://\\S+\\b/?",
      "name": "constant.language log.constant"
    },
    {
      "match": "(?<![/\\\\\\w])([-\\w]+\\.)+([-\\w])+(?![/\\\\\\w])",
      "name": "constant.language log.constant"
    }
  ],
  "scopeName": "text.log"
}|json}