<< Back to previous view

[TLOG-9] spy macro (or new spy macro) that accepts a message Created: 08/Dec/12  Updated: 07/Jun/14  Resolved: 07/Jun/14

Status: Closed
Project: tools.logging
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Dave Sann Assignee: Alexander Taggart
Resolution: Completed Votes: 0
Labels: None


 Description   

I think it might be useful to have spy be able to take a message to be logged in addition to the data. (or have a similar macro showing an optional message instead of the code).

(spy "doing x" (blah))
(spy :doing-x (blah) ; because it is easier to type sometimes

with spy this may conflict with the log-level.

I find this sort of function with a message useful and use it quite often. Much more often than plain logging. Generally - I would't log the code unless it logged file and line number too.



 Comments   
Comment by Alexander Taggart [ 07/Jun/14 7:10 PM ]

Added spyf, which takes a format string.

https://github.com/clojure/tools.logging/commit/91bc737ac37e1dbf8f4d658aa304154afac7a1dc

Generated at Mon Oct 20 17:54:34 CDT 2014 using JIRA 4.4#649-r158309.