I am in dire need of a way to color my less output while reading a file that is constantly being appended.
The file in questions is a Resin servlet container log.
My current "implementation" of the color scheme works using tail -F
and sed
for editing in colors around keywords. I have four words to color: INFO, WARN, ERROR, DEBUG
, one of which occurs once per line.
I have tried using the LESSOPEN
environment variable, but I can't seem to keep reading the log. The file is not tailed once it has been open.
I have very little control over the server, and cannot really install anything other than my own scripts in my home folder, so no packages. The server in question is a RHEL 6.4.
The problem is that less
does not keep reading the file.
Is there a way to tail the log continuously using the LESSOPEN
environment variable, or do I need some more complex tools?
less
not getting new output, is it stripping the colors, what?multitail
is not an option, can't install anything on the server.