Created
August 13, 2015 19:19
-
-
Save stav/8907666333d4e1f73e61 to your computer and use it in GitHub Desktop.
Syntax Definition file for Scrapy log files
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
# [PackageDev] target_format: plist, ext: tmLanguage | |
--- | |
name: Scrapy Log | |
scopeName: source.slog | |
fileTypes: [slog] | |
uuid: 030ae93f-5fcf-4bbd-8caa-81fcdcf77ec3 | |
patterns: | |
- comment: date-time [logger] level | |
- comment: (Scrapy 1.1.0dev1) | |
name: support.constant | |
match: \d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2} \[([^\]]+)\] ([A-Z]+):\s | |
captures: | |
'1': {name: entity.other.attribute-name} | |
'2': {name: entity.name.tag} | |
- comment: date-time level [logger] | |
- comment: (Scrapy 1.0.1.post1+g5b8c9e5) | |
name: support.constant | |
match: \d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2} ([A-Z]+) \[([^\]]+)\] | |
captures: | |
'1': {name: entity.name.tag} | |
'2': {name: entity.other.attribute-name} | |
- comment: Request | |
name: constant.other | |
match: <([A-Z]+)\s([^]]+?)> | |
captures: | |
'1': {name: variable.parameter} | |
'2': {name: string} | |
- comment: Response | |
name: constant.other | |
match: <([\d]+)\s([^]]+?)> | |
captures: | |
'1': {name: variable.parameter} | |
'2': {name: entity.name.class} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save YAML file to Sublime User directory, e.g.:
Then build: with Tools > Build System set to "Automatic", use Tools > Build (Ctrl-B)
Save Scrapy log output to a file with an
slog
extension, for example:Then open in Sublime Text and it will be color coded according to your
color_scheme
.