[TLOG-11] tools.logging doesn't AOT Created: 22/Mar/13 Updated: 30/Apr/13 Resolved: 30/Apr/13
|Reporter:||Allen Rohner||Assignee:||Alexander Taggart|
tools.logging does not work if used in a project that is AOT'd.
To reproduce, in a project using tools.logging:
I can workaround it in my project by including
|Comment by Alexander Taggart [ 30/Apr/13 5:11 PM ]|
It's not clear to me what "does not work" means.
I've made a quick test project: https://github.com/ataggart/aot-log-test
Cloning that repo, running lein jar then lein run yields the output I would expect.
Further details appreciated.
|Comment by Allen Rohner [ 30/Apr/13 6:32 PM ]|
This isn't a bug; User Error.
I thought I had fully isolated the bug in my app's codebase, but I forgot about an :injection that we have that jams a debug macro into clojure.core.
for posterity, it was caused by doing
Moving the require call to inside the macroexpansion resolved the bug. (And yes, I'm moving to https://github.com/dgrnbrg/spyscope now that I'm aware of it)
Sorry to waste your time, Alex.
|Comment by Alexander Taggart [ 30/Apr/13 7:06 PM ]|
On a related note, do you see any utility in keeping the spy macro? It's pretty much what you're doing. Do you use inspect for logging or as an in-repl debugging tool? Perhaps spy makes more sense in tools.trace.
|Comment by Allen Rohner [ 30/Apr/13 7:12 PM ]|
TBH, I didn't know about spy. Also, my inspect macro predates clojure.tools.logging, and might even predate clojure.contrib.logging, if you can believe that.
I use inspect as a debugging tool. The main value to jamming it into clojure.core is that I can use it in any file, without having to stop and muck with the ns declaration. Therefore if I was going to use anything else, it would need to have that property.