acl.pl - Advanced Color Logs
version 0.6.0
written by Patrick Mullen (p_mullen@linuxmail.org)

Most of the code is original.  Notable exceptions are the color table,
some of the config file parsing, and the general idea, which were taken
from ColorLogs.  I have received quite a bit of help since the start
of this project.  Please see the NEWS file for a list of contributors.

What acl does over ColorLogs is add the ability for multiple search strings,
provide ordering of search strings, allow different configuration files to
be used, have multiple highlights, and a few other features.

The inspiration for this was the display of 'named' log entries.  Named is a
very noisy daemon (lots of log entries).  Every hour named logs several lines
of status messages.  While I didn't want to totally remove these messages
from view, I didn't want them to be highlighted as much as abnormal named
messages.  The obvious way to do this was to highlight all named log entries
EXCEPT status messages.  ColorLogs (v1.1) didn't/doesn't do this.  The line
that does this in the example acl.conf is
BACKGROUNDCYAN,named,!STATS,!USAGE,!Cleaned cache
                                                             
USAGE is really simple.  Edit acl.conf to your liking and copy it to
/etc/acl.conf.  If you don't like that location, just change the line
that sets $configfile appropriately.   Also, an alternate config file may
be specified on the command line by using "-f <filename>".  Colorization is 
done through STDIN, so you could redirect the input to be a file by doing 
something similar to

$ acl.pl < file_to_colorize

You could also to a following tail of a file, such as a log file with
a command like this

$ tail -f /var/log/messages | acl.pl

Note that when following log files, periodically the logs are rotated (if
you have that support), causing the file that is being tailed to be closed
and acl will not get any more input.  Just kill the original command by
hitting <ctrl>-c then restart the above line to continue with the new file.

If you wish run acl on a virtual console, add the following line            
to /etc/rc.d/rc.local

$ tail -f /var/log/messages | /path/to/acl.pl >> /dev/tty12&

The above suffers from the same logrotate problem described above, but
if you added an entry to the crontab to repeat the above command whenever
the logs are rotated, the problem should be fixed (NOT TESTED).

That's about all.  This code is released to the public domain and has no
warranties, expressed or implied.  It works for me, but your mileage may
vary.  I am not responsible for the use or misuse of this program, ...

Feel free to use this code any way you like, just please include my name
and email in the credits, like I did for J-Dog above.  Thanks.


The LATEST VERSION of this program can be found at
http://www.LinuxRC.org/projects/acl


VISIT THE LINUX RESOURCE CENTER -- HTTP://WWW.LINUXRC.ORG

 
Patrick Mullen
p_mullen@linuxmail.org
http://www.LinuxRC.org  

