38
loading...
This website collects cookies to deliver better user experience
Below is a syntax definition file for our logs. It is good for a starting point because it is simple.
patterns:
- name: text.command
match: \"command\":[0-9]{4}
- name: text.command_name
match: \"command_name\":\"(.*?)\"
captures:
'1': {name : text.command_name.1}
- name: text.fsm
match: (.*)(FSM :.*(\[.*\]).*)
captures:
'1': {name : text.fsm.prefix}
'2': {name : text.fsm.suffix}
'3': {name : text.fsm.event}
- name: text.errors
match: (.*(\"error_code\":[1-9]).*)
captures:
'1': {name : text.error.fullline}
'2': {name : text.error.code}
- name: text.ping
match: .*\"command\":8888.*
- name: text.exception.message
match: (.*)Exception(.*)
- name: text.exception.stacktrace
match: ^((?![0-9]{8}).)*$
- name: text.log.error
match: .*\| E \|.*
-- mod-version:1 -- lite-xl 1.16
local syntax = require "core.syntax"
syntax.add {
files = { "%.wren$" },
comment = "//",
patterns = {
{ pattern = "//.-\n", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = "-?%.?%d+", type = "number" },
{ pattern = "%.%.%.?", type = "operator" },
{ pattern = "[<>!=]=", type = "operator" },
{ pattern = "[%+%-=/%*%^%%<>!~|&?:]", type = "operator" },
{ pattern = "[%a_][%w_]*%s*%f[(\"{]", type = "function" },
{ pattern = "[%a_][%w_]*", type = "symbol" },
},
symbols = {
["break"] = "keyword",
["class"] = "keyword",
["construct"] = "keyword",
["else"] = "keyword",
["false"] = "keyword",
["for"] = "keyword",
["foreign"] = "keyword",
["if"] = "keyword",
["import"] = "keyword",
["in"] = "keyword",
["is"] = "keyword",
["null"] = "keyword",
["return"] = "keyword",
["static"] = "keyword",
["super"] = "keyword",
["this"] = "keyword",
["true"] = "keyword",
["var"] = "keyword",
["while"] = "keyword",
["this"] = "keyword2",
["true"] = "literal",
["false"] = "literal",
["null"] = "literal",
},
}
38