Color your logs with CCZE

Those of us who work with servers or with GNU / Linux In general we know that one of the best sources of information we have to know what happens with our system, are the Logs.

It is rare that a program or service does not have them, and it is always good to have tools that allow us to read this type of information more comfortably.

CCZE exactly what it does is color our logs. Has support for apm, exim, fetchmail, httpd, postfix, procmail, squid, apache, syslog, ulogd, vsftpd, xferlog and many other applications.

En Debian It is installed by opening a terminal and typing:

$ sudo aptitude install ccze

How do we use it?

Very easy. If we put in the terminal, for example:

# tailf /var/log/apache2/access.log

We will have something like this:

Now, if we put:

# tailf /var/log/apache2/access.log | ccze

We obtain as a result:

Much better right? But actually this is not the way to use CCZE. According to Mon of this app, it should be:

# ccze [opción] <log

One of the most interesting options is, for example, the one that helps us better understand the log of Squid. For this we put:

# ccze -C </var/log/squid/access.log

El -C what it does is make the Unix timestamp easy to read. You know, if you want more information about what can be done with CCZE, put in the terminal:

man ccze

We already saw how to use this tool when pinging this post.


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   RAW-Basic said

    elav, today you are on a streak of making me happy .. xD

    Thanks again! .. 😀

    1.    elav said

      Hehehehe ... you're welcome

      1.    dhunter said

        It works for me only with tailf but not with cat, that is, once the cat command ends no more colors, it only works with streams.

        ccze </ var / log / dmesg

        This prints with colors and when it finishes the terminal is blank as if it had just given enter.

        // after going to man ...
        Solution: Use -A to print colors with ANSI and not with ncurses.

        ccze -A </ var / log / dmesg

        1.    elav said

          Everything is solved with the MAN hahaa

  2.   auroszx said

    Like it's a little dizzy with those colors 😛 It's still good.

  3.   Toberius said

    Excellent this application to read logs !!! I loved it.

    Thank you very much and keep going.

  4.   st0rmt4il said

    Thanks, so I will have my files more colorful hehe!

    XD!

    Regards!

  5.   Mauricio said

    The logs look very nice now 😀

    I stay like this:
    http://i.imgur.com/XyUmFPa.png

  6.   Ariel said

    Very good thank you very much, it would be even better if I had a default plugin to colorize the Android SDK logcat. Cheers!

  7.   zardo7 said

    Hello friends; Do I have to register again to use the forum? Because it tells me that I am not registered and I am.
    Thank you