I would like to change the way I display a big (~6000 lines) log file using wim, less or whatever, in order to simplify the problem checking.
I'd like to highlight some line of the log based on a patter (i.e. error
, warning
, info
...) and/or hide some others.
Which tools could I use? Do I just need a shell script? It's important that after the process, I can read the output using less, vim, ... to perform search operations!
Edit: a little piece of the log:
2016/10/25 12:19:24.403355 INFO <ServiceManager.cpp#2614 TID#3> Security object has NOT been parsed
2016/10/25 12:19:24.403369 INFO <ServiceManager.cpp#1263 TID#3> Service object sequence started
2016/10/25 12:19:24.403372 DBG <ServiceManager.cpp#1276 TID#3> preinvoke succeeded
grep
has a--color
option you could work with.echo
can also output colored text with-e
option, see http://misc.flogisoft.com/bash/tip_colors_and_formatting . – Valentin B. Oct 25 '16 at 10:53