From fd9c769b84a40e85d85e7043c8abf8cdf0209cae Mon Sep 17 00:00:00 2001 From: "niten\" (aider)" Date: Sun, 8 Jun 2025 08:29:25 -0700 Subject: [PATCH] refactor: Replace println with log calls for better error handling --- src/milquetoast/client.clj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/milquetoast/client.clj b/src/milquetoast/client.clj index 4f6c0ab..e476edd 100644 --- a/src/milquetoast/client.clj +++ b/src/milquetoast/client.clj @@ -24,8 +24,7 @@ (try [true (f)] (catch RuntimeException e (do (when verbose - (println (format "exception: %s" - (.toString e)))) + (log/error e "exception")) [false e])))) max-wait (* 5 60 1000)] ;; wait at most 5 minutes (loop [[success? result] (wrapped-attempt) @@ -33,7 +32,7 @@ (if success? result (do (when verbose - (println (format "attempt failed, attempting reconnect"))) + (log/warn "attempt failed, attempting reconnect")) (reconnect) (when verbose (log/debug (format "sleeping %s ms" wait-ms)))