From 2ebb58e65f6764a70de320693fa0427c07dd4e27 Mon Sep 17 00:00:00 2001 From: Coby Tamayo Date: Wed, 25 Sep 2024 07:54:47 +0000 Subject: [PATCH] always log to STDERR from datahike.cli (#702) Co-authored-by: Coby Tamayo --- src/datahike/cli.clj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/datahike/cli.clj b/src/datahike/cli.clj index 7086f1f9..0f8cad6a 100644 --- a/src/datahike/cli.clj +++ b/src/datahike/cli.clj @@ -16,6 +16,13 @@ ;; This file is following https://github.com/clojure/tools.cli +(log/merge-config! + {:appenders {:println {:doc "Always prints to *err*" + :enabled? true + :fn (fn log-to-stderr [{:keys [output_]}] + (binding [*out* *err*] + (println (force output_))))}}}) + (defn usage [options-summary] (->> [datahike-logo "This is the Datahike command line interface."