> I really like the clojure.contrib.logging library, but I find myself > often getting tricked into thinking it works like println:
Nice idea. My $0.02: Checking the the type of the last arg seems too dwim to me, but it will certainly work. I've been thinking recently that info/warn/etc should be println or printf like and not take an exception, while log itself should be the only thing that does take an exception. That would break lots of code, so it's probably off the table. Instead, like others, I have my own macro. This one use printf semantics. For example: (flog :debug "Added %s [%s] to the write queue" (:query subject) (count msgs)) (defmacro flog [level fmt & args] "Logs a message, using clojure.contrib.logging/log after running the arguments though format. Should move this to logging.clj" `(log ~level (format ~@(cons fmt args)))) Cheers, Chris Dean
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en