mirror of https://github.com/status-im/timbre.git
Housekeeping
This commit is contained in:
parent
758c370ac7
commit
853807df4c
|
@ -389,14 +389,11 @@
|
||||||
|
|
||||||
(def-loggers) ; Actually define a logger for each logging level
|
(def-loggers) ; Actually define a logger for each logging level
|
||||||
|
|
||||||
(defmacro log-errors [& body]
|
(defmacro log-errors [& body] `(try ~@body (catch Exception e# (error e#))))
|
||||||
`(try ~@body (catch Exception e# (error e#))))
|
|
||||||
|
|
||||||
(defmacro log-and-rethrow-errors [& body]
|
(defmacro log-and-rethrow-errors [& body]
|
||||||
`(try ~@body (catch Exception e# (error e#) (throw e#))))
|
`(try ~@body (catch Exception e# (error e#) (throw e#))))
|
||||||
|
|
||||||
(defmacro logged-future [& body]
|
(defmacro logged-future [& body] `(future (log-errors ~@body)))
|
||||||
`(future (log-errors ~@body)))
|
|
||||||
|
|
||||||
(comment (log-errors (/ 0))
|
(comment (log-errors (/ 0))
|
||||||
(log-and-rethrow-errors (/ 0))
|
(log-and-rethrow-errors (/ 0))
|
||||||
|
|
Loading…
Reference in New Issue