Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defmacro defn-switch-log
[& args]
(if (logger-enabled?) ; Compile-time condition
`(defn-log ~@args) ; With traces: forwarding to `defn-log`
`(defn ~@args))) ; Without traces: forwarding to `defn`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment