ccze: Colorize your logs, as an added step

Oh, the fun I must be missing by not caring to skim through my system logs.

2013-09-14-4dkln41-ccze

That’s ccze, and by comparison with some other log utilities, it’s a bit simplistic. Believe it or not.

That’s the Debian version you see there, skimming through the system logs. Arch has a version in community, which seems to work the same.

ccze has apparently been around a long time; the Freecode page shows the latest update in 2003.

If it has an official home page, somebody ought to tell both the Arch and Debian maintainers. The Arch page leads to the Freecode page above, and the Freecode page thinks the website is the Debian package search.

Things like that amuse me.

For what it’s worth — which isn’t much — I prefer lnav or multitail over ccze. My best success with ccze was to pipe a log through it, and then I got the color effects.

But ccze itself isn’t a pager, which means you either trim back on the log with head or tail, or use less or more, like you see above.

(If you want to use most, like me, because I’m cool, try use the -A switch with ccze to get raw ANSI output. Otherwise, the escape characters will be spattered all through the log text.)

That’s a bit high maintenance for me, particularly when lnav seems so featureful. And multitail is so much fun to use.

On the other hand, it does work like a colorizing filter. So maybe that’s the Unix solution. You can decide.

5 thoughts on “ccze: Colorize your logs, as an added step

  1. Daniel

    I thought I was the only one who noticed it… I use it an alias in my ~/.zshrc

    alias mem=”free -m | awk ‘/che:/ {print \$3\” total used\n\”\$4\” total left\”}’ && echo && ps -eo rss,args | \
    sort -r -n | awk ‘{print \$1/1024\” MB – \”\$2\” \”}’ | column -t | ccze -m ansi | head”

    Remove the “\” escape chars if you want to test it in the terminal.

  2. Pingback: Bonus: Closing the Cs, and a confession | Inconsolation

  3. Pingback: highlighter: Picking out letters, words, phrases | Inconsolation

  4. Pingback: tdu (and dugroup): I can think of no better title | Inconsolation

  5. Pingback: clog: Custom color for logs | Inconsolation

Comments are closed.