Last active
August 29, 2015 13:55
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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