taoensso / timbre

Pure Clojure/Script logging library
https://www.taoensso.com/timbre
Eclipse Public License 1.0
1.45k stars 172 forks source link

How to output color in babashka scripts? #393

Open Alecton4 opened 2 hours ago

Alecton4 commented 2 hours ago

When trying the following simple example with babashka v1.12.195, bb would throw Could not resolve symbol: t/color-str:

#!/usr/bin/env bb
(require '[taoensso.timbre :as t])
(t/info (t/color-str :green "something good happened"))

I can only do (t/info "something good happened") without color.

And (keys (ns-publics 'taoensso.timbre)) gives the following:

(-log-and-rethrow-errors merge-config! *config* warnf log! -ensure-vec -log! -spy spy warn with-level trace swap-config! set-level! debug debugf tracef infof println-appender errorf spit-appender info error)

So the timbre in babashka is not a complete version and cannot output color?

ptaoussanis commented 2 hours ago

@Alecton4 Hi there!

So the timbre in babashka is not a complete version and cannot output color?

I'm afraid I'm not the maintainer of or familiar with Babashka's version of Timbre - I believe that might be Michiel Borkent?

Would suggest posting to the relevant Babashka repo - someone there should hopefully be able to help!