Lexer properties: Log Files
Lexer properties: Log Files
Hello,
I am using CudaText version 1.134.0.2 win64.
I wanted to change ISO8601 formatted date time text to be displayed in yellow color as whole. Currently only part of it is in yellow color as can be seen in attached picture.
I could not open settings for "Log files ^" lexer. I could not find it in lexer library. I could not open lexer styles mapping.
I mean I click mentioned menu options, but nothing comes up. No config file opens. Only lexer library display a dialog and others simply does nothing.
Is there any way I play with coloring options of "Log files ^" lexer?
Thanks & Regards,
Ertan
I am using CudaText version 1.134.0.2 win64.
I wanted to change ISO8601 formatted date time text to be displayed in yellow color as whole. Currently only part of it is in yellow color as can be seen in attached picture.
I could not open settings for "Log files ^" lexer. I could not find it in lexer library. I could not open lexer styles mapping.
I mean I click mentioned menu options, but nothing comes up. No config file opens. Only lexer library display a dialog and others simply does nothing.
Is there any way I play with coloring options of "Log files ^" lexer?
Thanks & Regards,
Ertan
- Attachments
-
- image_2021-06-20_002340.png (1.94 KiB) Viewed 2266 times
-
uvviewsoft
- Posts: 392
- Joined: 01.12.2020 13:46
Below worked fine for me. It would be nice if it can be added as default
Thanks.
Code: Select all
"number": {
"regex": "\\b((\\d+[-/\\.\\:\\\\\\ \\T])+\\d+)\\b",
"style": "Id1"
}
I just wanted to add alternative coloring in "Log files.cuda-litelexer" This is something else than what already exists.
Json parsed OK when CudaText is loading. But, new coloring is not applied. My addition to that lexer file is as following
There are some Turkish national characters. I escaped them thinking UTF8 JSON string is not supported and still not working. Even, TEST is not working.
Do I need to modify some other file(s) in order to have "warning2" to work with this lexer?
Thanks & Regards,
Ertan
Json parsed OK when CudaText is loading. But, new coloring is not applied. My addition to that lexer file is as following
Code: Select all
"warning2": {
"regex": "^.*(TEST|ALİ|VELİ).*$",
"style": "LightBG4"
}
Do I need to modify some other file(s) in order to have "warning2" to work with this lexer?
Thanks & Regards,
Ertan
-
uvviewsoft
- Posts: 392
- Joined: 01.12.2020 13:46
Adding that lines is working, here is my file 'Log files.cuda-litelexer',
I placed your lines in the middle.
lines with 'TEST' word are hilighted in blue.
I placed your lines in the middle.
Code: Select all
{
"about": "Converted from Matthias030's lexer by Alexey Torgashin",
"files": "*.log",
"case_sens": false,
"consider_spaces": true,
"rules": {
"success": {
"regex": "^.*((?<!no )success|(?<!nicht )erfolgreich|(no|without( any)?) error|fehlerfrei|(ohne |kein(e)? )fehler|(?<!not )succeed|mit erfolg).*$",
"style": "LightBG3"
},
"error": {
"regex": "^.*(error|exception|fail|fatal|crash|(?<!be)fehl(geschlagen)?(er)?|(ohne|kein|nicht) erfolg|violat).*$",
"style": "LightBG1"
},
"warning": {
"regex": "^.*(warn|critical|kritisch|conflict|konflikt|ung(ü|ue)ltig|invalid|(nicht |un)zul(ä|ae)ssig|not ready|nicht bereit|not found|nicht gefunden|no success|not succeed|veraltet|out of date).*$",
"style": "LightBG2"
},
"warning2": {
"regex": "^.*(TEST|ALİ|VELİ).*$",
"style": "LightBG4"
},
"type": {
"regex": "\\(.*?\\)|\\[.*?\\]|\\{.*?\\}",
"style": "Id2"
},
"id": {
"regex": "[a-z_]\\w*",
"style": "Id"
},
"number": {
"regex": "\\b((\\d+[-/\\.:T])*\\d+)\\b",
"style": "Id1"
}
}
}
Adding warning2 just below warning works.
Adding it to the last does not work.
This config does not highlight TEST lines for me.
Adding it to the last does not work.
Code: Select all
{
"about": "Converted from Matthias030's lexer by Alexey Torgashin",
"files": "*.log",
"case_sens": false,
"consider_spaces": true,
"rules": {
"success": {
"regex": "^.*((?<!no )success|(?<!nicht )erfolgreich|(no|without( any)?) error|fehlerfrei|(ohne |kein(e)? )fehler|(?<!not )succeed|mit erfolg).*$",
"style": "LightBG3"
},
"error": {
"regex": "^.*(error|exception|fail|fatal|crash|(?<!be)fehl(geschlagen)?(er)?|(ohne|kein|nicht) erfolg|violat).*$",
"style": "LightBG1"
},
"warning": {
"regex": "^.*(warn|critical|kritisch|conflict|konflikt|ung(ü|ue)ltig|invalid|(nicht |un)zul(ä|ae)ssig|not ready|nicht bereit|not found|nicht gefunden|no success|not succeed|veraltet|out of date).*$",
"style": "LightBG2"
},
"type": {
"regex": "\\(.*?\\)|\\[.*?\\]|\\{.*?\\}",
"style": "Id2"
},
"id": {
"regex": "[a-z_]\\w*",
"style": "Id"
},
"number": {
"regex": "\\b((\\d+[-/\\.:T])*\\d+)\\b",
"style": "Id1"
},
"warning2": {
"regex": "^.*(TEST|ALİ|VELİ).*$",
"style": "LightBG4"
}
}
}
-
uvviewsoft
- Posts: 392
- Joined: 01.12.2020 13:46