log-highlight.nvim icon indicating copy to clipboard operation
log-highlight.nvim copied to clipboard

Support for lowercase log levels

Open bartekjaszczak opened this issue 1 year ago • 1 comments

Hi,

would you consider adding support for lowercase log levels? More than once I've encountered "info" or "[error]" in lowercase. I'm happy to submit a pull request if you'd be willing to accept it.

bartekjaszczak avatar Oct 09 '24 07:10 bartekjaszczak

I didn't add the lowercase keywords because I imagine it might be distracting if those show up amid the lines (not as log level tags). But if you find that will be helpful in your case, then sure, we can support that.

Are there other candidates in your mind except for the mentioned info and error? I'd prefer starting with a smaller list, and it can always be extended in the future whenever there's a need for a new keyword.

And I'm open to pull requests, feel free to send a patch. :)

fei6409 avatar Oct 09 '24 16:10 fei6409

Sorry to take so long. Here's the pull request: https://github.com/fei6409/log-highlight.nvim/pull/5

I proposed some changes which include, but are not limited to "info" and "error". Some I've seen myself ("debug", "trace", "warn") and some I feel that might be common enough to be included here ("err", "warning", "dbg").

Please note that I've not seen many logs in my life and I might just happen to work with some odd types of logs (which have the lowercase log levels) and if you feel that's the case, I'll just use the forked plugin :)

bartekjaszczak avatar Oct 18 '24 17:10 bartekjaszczak

spdlog library in cpp use lowercase log levels Xnip2024-10-26_01-16-49

epheien avatar Oct 25 '24 17:10 epheien