refactor: Replace println with log calls for better error handling

This commit is contained in:
2025-06-08 08:29:25 -07:00
parent d92cab7adb
commit fd9c769b84
+2 -3
View File
@@ -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)))