bat icon indicating copy to clipboard operation
bat copied to clipboard

Syntax: [Log] scope whole line based on log level

Open keith-hall opened this issue 3 years ago • 2 comments

Update the log syntax definition to allow color schemes to color entire lines differently based on log level. Addresses #2152

keith-hall avatar Apr 09 '22 21:04 keith-hall

I was debating whether to put details of how to customise the color scheme in the changelog or readme, but seems too specific to belong in either place (its a shame Sublime doesn't support color scheme settings - "highlight_whole_log_line" would be a neat way to tackle this), so I'll likely drop a comment on the issue where it was requested. Not sure if worth mentioning this change in the changelog at all (as it won't affect anything without customization, unless we decide to change the scopes - I'm considering markup.error.line for example to cover the whole line instead of something like meta.log-level.error, and the fatal text could be markup.error.word or something, and color schemes can differentiate based on that)?

keith-hall avatar Apr 10 '22 12:04 keith-hall

Nice! I fully trust your judgement on whether or not to mention this in CHANGELOG.md. Wouldn't it be good to also add a regression test though?

Enselic avatar Apr 12 '22 18:04 Enselic

How do we proceed here? Merge without an additional test?

sharkdp avatar Sep 02 '22 21:09 sharkdp

I think there's no way to add a regression test without updating one of the color schemes - this PR enables color schemes to color entire lines differently based on log level, but has no effect unless the color scheme targets the new scopes. So I'm thinking to merge without an additional test.

keith-hall avatar Sep 04 '22 03:09 keith-hall

Thanks

sharkdp avatar Sep 04 '22 12:09 sharkdp