Install ccze on Raspberry Pi

Reading and analyzing the log files in white text on a black background can be difficult and take a lot of time. Colorized log files is one of the solutions. The ccze is a command line tool that prints the colorized log files making them more readable.

This tutorial explains how to install ccze on Raspberry Pi.

Connect to Raspberry Pi via SSH. Run the following commands to update the package lists and install ccze:

sudo apt update
sudo apt install -y ccze

Once the installation has finished, we can check version of ccze:

ccze --version

Now we can use head, tail, cat or other command to read the log file and then colorize the output by piping to ccze command. The -A option generates ANSI output by inserting color codes in the log.

cat /var/log/daemon.log | ccze -A

Output looks something like this:

Colorized Log File Using ccze

If want to completely remove the ccze and related dependencies, use the following command:

sudo apt purge --autoremove -y ccze

Leave a Comment

Your email address will not be published. Required fields are marked *