Andy's Cafe

Terminal Logging With Color

Last updated :

These days I’ve been writing a lot of babashka instead of reaching for bash or python to do minor scripting tasks at work.

I am also a big fan of the work done at charm and the relevant products in this case are gum and lipgloss.

Using gum style I can log any text in basically any color I want. And while there’s not a ton of functional benefits to this, I think there’s something to be said about adding color into the logs we write.

I just wanted to take the time to outline the steps I took to do all of the following

Colored Logging

I picked the two color palettes from log to emulate first.

Local Dependencies

Reply via email

Tags

#story   #projects   #babashka   #clojure