Colorlogs

Colorlogs was originally concieved by whitetrash and wrlwnd late one night over a few beers. When wrlwnd came to me with this idea I immediately wrote him a POC program and after talking further with him about ANSI codes, I developed the first working version. Then after showing this tool off to a few people (namely whitetrash, wrlwnd, and disorder) they suggested some improvements... the primary one being a config file so that end users wouldn't have to dink around with the actual perl code. After about 2 hours and 5 beers I finished the first "releaseable" version of this program.

What Colorlogs basically is color codes your logfiles for simpler reading. I have always wanted to just be able to glance across the room at a terminal which is tailing the logs and just at a glance tell if everything is normal or of some strange activity is occouring which warrants further investigation. After all, looking across the room and seeing a logline being displayed in RED is sure to get anyones attention.

v1.0

Configuration and installation of Colorlogs is rather simplistic and pretty well documented in the README file.

You can download the file itself here

KNOWN ISSUES

  • As I wrote this script and ran it overnight, I noticed that mysteriously the script had completely stopped working at about 3am the following morning. After further investigation I discovered that /etc/cron.daily/logrotate had run and rotated my logs thereby siezing the colorizing of the logs. This is a known problem and maybe in the next version I will add a way around this.
  • As of the latest release, I do not automatically search the config file for special characters which will wreak havoc on the script unless designated as special characters. In the next version I plan on fixing this oversite. For the time being you in the config file you should preceed all special characters with a leading / which designates the next caracter as a special character and not an operator.


v1.1

After the overwelming support from literally hundreds of people saying how simple and yet amazingly useful this script is after it's announcement on Freshmeat.net and Linuxapps.com, I decided that I needed to redo this script to make the code tighter and offer many more display options as well as handle parsing of whitespace and special characters in the config file better. Before I could even get home to start recoding the script Leon Breedt optimized the code and sent it to me. I added a ton more display options as well as coded in handling of special characters in the config file and am releasing it under version 1.1.

Thanks to all the people who have mailed me showing your support,

Configuration and installation of Colorlogs is rather simplistic and pretty well documented in the README file.

You can download the file itself here

PLANNED UPGRADES

  • Fix Logrotate bug - script stops working when logrotate is run
  • Add "Beep" Option - Add the ability to Beep the PC speaker when an event occours
  • Develop Multiple Config files - Write config files to work with different logs (maillog, secure, etc)

If you should have any question or comments, please direct them to J-Dog