4 07 2015
How did I set color in my life.
One day I had a bug on OpenStack platform. If I remember well it was a nova problem.
Lucky day for a debug session, all nova logs was in DEBUG level ! But as you may know, when you set this log level in OpenStack services, the output can be really, really, really verbose.
So that night, I wrote a script openstack-log-colorizer
This script is a devops tool written in python. Easy to setup and require only standard python library.
The first idea was to provide live log level filter and feature like log coloration. The script behavior is to parse log format with a regex. Color the line if the regex match, else just display the line without color.
Setup openstack log colorizer :
Use case : I want display only log greater than or equal to INFO for nova and neutron services.