Colorize is a powerful and versatile Perl script to colorize your logs. With support for multiple log formats and customizable color schemes, this tool makes it simple to highlight important information and pinpoint problem areas, while also making the logs more visually appealing.
It was one of the first solutions of this kind and it inspired the development of other similar tools, such as CCZE.
Although the project is not actively maintained, it still works without issues and it can be useful for those who are looking for a similar solution. Whether you're a system administrator monitoring daily logs or a developer debugging a complex application, colorize is an essential tool for anyone who wants to make sense of their log data in a fast and efficient way, while also enjoying the nice look of the colorized output.
It uses coherent colors for every log formats which is pretty cool but you can use your own colors by modifying the configuration file in your home directory (~/.colorizerc
) or system-wide (/etc/colorizerc
).
Install my tap from raszi/homebrew-tap with the following command:
brew tap raszi/tap
Then install the formula with:
brew install raszi/tap/colorize
It is in the ports, you can install with any preferred way.
It is in the repositories, you can install as root with:
urpmi colorize
This script depends on Term::ANSIColor, so you will need to install it first.
Under Debian GNU/Linux:
apt-get install perl-modules
Gentoo:
emerge -vta perl-core/Term-ANSIColor
Mageia:
urpmi perl-Term-ANSIColor
make install
Just pipe the logs in the script, and have fun.
cat /var/log/daemon.log | colorize
tail -0f /var/log/daemon.log /var/log/apache/access.log | colorize
colorize < /var/log/messages
In the TIPS file and in the examples directory.