shodan
shodan copied to clipboard
inspect should also report the file it was called from
Hi, it's me again for my apparently annual shodan bug report!
I like shodan a lot, especially since you fixed #2. I have another feature request following up on #2: I'd also like to see the console messages from (shodan/inspect)
report the source file that I invoked the inspect
macro from. Currently calls to (inspect)
wind up reporting every log statement as coming from inspection.cljs:44
, which is where (.log js/console)
is ultimately invoked from.
At the same time, I'd also like to have fewer :requires
in the ClojureScript files that I log from, and I think with more recent clojurescript releases that's possible. My ideal interface as a consumer of shodan
would look roughly like this:
(ns vishnu.norad
(:require [shodan.console :as console :include-macros true]
[vishnu.norad.validation :as validation]))
(defn can-unlock [& args]
(let [result (validation/validate-nuclear-unlock-codes args)]
(console/inspect args)
true)
...note the single (require)
statement - moreover I'd like to see the console/log
output marked in my browser as coming from vishnu/norad/unlock-codes.cljs
instead of noprompt/shodan/inspection.cljs
.
I took a brief look at rewriting shodan.inspection
but couldn't see an obvious way to de-macroize the stuff in there, but if you can point me in the right direction I'm happy to spend some time fixing this on my own. Thanks!