2010
05.20
05.20
A few days ago I was visiting one of my favorite sites (commandlinefu) and read something about “Color Highlighted Log Viewing” so I tried it and was instantly hooked. According to it’s website: “CCZE is a robust and modular log colorizer with plugins for apm, exim, fetchmail, httpd, postfix, procmail, squid, syslog, ulogd, vsftpd, xferlog, and more”
Usage is really simple. Just install it:
yum install ccze (Red Hat/CentOS)
apt-get install ccze (Debian/Ubuntu)
And use it like:
tail -f -n 50 /var/log/syslog | ccze
You will see something like this:
References:
The RPM can be downloaded from
http://koji.fedoraproject.org/koji/buildinfo?buildID=126103
for some reason, if you want to colorize one-time (not following i.e. tail -f) you need to specify ccze -A for ANSI
Excellent
Very useful
How to pause it?
This is one of my most useful favorite tools!
Screenshot from http://www.askapache.com/linux/elite-log-file-scrolling-color-syntax.html
Can not get scrollback to work. so close to being awesome…
@Zee
1 year old post but just in case :
$ cat /var/log/ufw.log | ccze -A | less -R
will let you use ‘less’ in colorized version.
Awesome!
For better performance I have been adding the “-o nolookups” option
$ cat filename | ccze -A -o nolookups | less -R
[…] http://blog.tersmitten.nl/how-to-colorize-your-log-files-with-ccze.html […]
Brilliant!
Nice! Thanks!