I'm trying to use multitail
to tail logs with color highlights. I defined a custom color scheme in multitail.conf, something like this:
colorscheme:my-color
cs_re:red:^\[E
cs_re:yellow:^\[W
cs_re:magenta:^\[D
cs_re:green,,bold:All session(s) filled for.*
What I want to achieve with each line:
- Color the whole log-line Red if it starts with string '[E'
- Color ................................ Yellow if it starts with string '[W'
- Color ................................ Magenta if it starts with string '[D'
- Color ................................ Green if the line contains the string 'All session(s) filled for'
Unfortunately, none of the above is happening for me. For the first 3, it does color correctly the substring (e.g. '[E', '[W', etc) but not the whole log-line. In the last case, it doesn't color at all.
I also want to color the whole line by matching the third character of a line, e.g. color it Blue if the third character is 'A', how should I do this reliably with multitail
?