vscode-logfile-highlighter
vscode-logfile-highlighter copied to clipboard
Add option to highlight whole line
For example, I might want to highlight the whole line where an error occurred so it's easier to find when scrolling
That would be really helpful and cut down on the extra patterns you need to add but if you add:
"logFileHighlighter.customPatterns": [ { "pattern": "(ERROR .*)", "foreground": "#af1f1f", "background": "#030303" },
to your settings that will highlight the whole line starting with ERROR
I agree with @kingmi140, this can easily be solved with a pattern like ".*ERROR.*"
. Or do you mean you want to highlight the row past the end of the line content, to the edge of the window? There is unfortunately no easy way to accomplish that AFAIK, since we can only decorate characters in the editor window, not the whitespace surrounding them.
@emilast Okay yeah ".*ERROR.*"
did the job and was what I was aiming for. I know we can use this pattern but wouldn't it be very nice and convenient to also make it a setting? I really believe that it is a commonly used feature among log-file highlighting tools like e.g. BaretailPro. I would never have guessed that I could use this pattern without this github thread...
Also ".*ERROR.*"
is case sensitive so then I would have to add another pattern to cover the lower case version ".*error.*"
.
Really appreciate the work you do!
In version 3.2.0, there is now a new setting for custom patterns: highlightEntireLine I hope this helps.
@emilast Thanks! och bra jobbat ;)