Skip to content

Instantly share code, notes, and snippets.

@quizdr
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quizdr/8727342 to your computer and use it in GitHub Desktop.
Save quizdr/8727342 to your computer and use it in GitHub Desktop.
Simple logging macro for any form; turn all logging on or off easily.
(defmacro alog
"When the if is true, add a logging string to the form. When it's false, do nothing."
[string form]
(if true
`(do
(println ~string)
~form)
form))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment