Created
May 16, 2024 14:14
-
-
Save and7ey/0e3e761cec8f8f3272f5c115c7d06f52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%YAML 1.2 | |
--- | |
# See http://www.sublimetext.com/docs/3/syntax.html | |
name: YC Log | |
file_extensions: [log] | |
scope: source.example-c | |
contexts: | |
main: | |
# Request identifiers | |
- match: '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} (START|END|REPORT) RequestID: .*' | |
scope: storage.type.string.c | |
# Dates | |
- match: '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}' | |
scope: comment.line.c | |
- match: '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{2,3}Z [0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}' | |
scope: comment.line.c | |
# Log level | |
- match: '\[(INFO|DEBUG)\]' | |
scope: comment.line.example-c | |
# Log level | |
- match: '\[(ERROR|WARNING)\]' | |
scope: keyword.control.flow.break.c | |
# Strings begin and end with quotes, and use backslashes as an escape | |
# character | |
- match: '"' | |
scope: punctuation.definition.string.begin.c | |
push: double_quoted_string | |
double_quoted_string: | |
- meta_scope: string.quoted.double.example-c | |
- match: '\\.' | |
scope: constant.character.escape.example-c | |
- match: '"' | |
scope: punctuation.definition.string.end.example-c | |
pop: true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment