-
Notifications
You must be signed in to change notification settings - Fork 45
Feature Request: Syntax highlighting #14
Comments
That would be nice indeed (rtail seems to handle that nicely). One option I've been thinking about is to define the highlighting rules in terms of a highlight.js language definition. I'll look into it. |
I looked into building a highlight.js language file to colorize logs I often tail. It was actually more complicated than I thought, since highlight.js is geared towards programming language syntax highlighting. Here's the current syntax highlighter I use in bash environments to make it easier to read logs. It uses sed with regular expressions to add ANSI color tags to lines based on log level keywords. https://gist.github.com/jdrews/af970bb97e8d34978621 And a picture of the output you get from it: Ideally, whatever you go with I'd hope it would support some sort of regular expression schema to allow users to tie matches to colors. To give an example: I'd want to color lines that contain "ERROR" red and lines that contain "WARN" yellow so it's easy to tell we have problems. |
Would it be possible to color using bash control sequences? |
Content/Syntax highliting would be a desired feature for me as well. +1 to this, thanks again for such an amazing tool. |
accept either a path or an app name from the frontend
To have at least bash color sequences (that are common in log files) will be a great addon.. integrating something like https://github.com/theZiz/aha maybe? Unfortunately I'm not myself a python dev to submit a PR.. |
Syntax highlighting would be a welcome feature add. Something that lets a user color logs based on search words or regex. I would expect this to be a parameter or configuration file.
For example highlight all lines that say ERROR with red, DEBUG with blue, INFO with green, etc.
The text was updated successfully, but these errors were encountered: