-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Currently, the book mentions that babashka includes clojure.tools.logging and timbre for logging.
Adding an example usage, would be a nice addition:
#!/usr/bin/env bb
(ns script
(:require
[clojure.tools.logging :as log]
[taoensso.timbre :as timbre]))
(defn -main [& args]
(log/info "Hello there"))
(when (= *file* (System/getProperty "babashka.file"))
(apply -main *command-line-args*))
; vim: set ft=clojure:We should also mention, that because timbre does a dns call to resolve the hostname, the hostname must exist in /etc/hosts to avoid slow (5sec) startup times:
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost <your-hostname>
::1 localhost <your-hostname>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels