Simpliest with "println"
Add this code to function:
(#(do (println "debug variable: " %) %) variable)
Or add this code to thread:
#(do (println "debug variable: " %) %)
This code to thread but with pretty print:
(mapv #(do (print "debug variable: ") (clojure.pprint/pprint %) %))
Example:
(s/def get-examples
[http :- http-client/IHttpClient
config :- protocols.config/IConfig]
(->> {:method :get
:url "http://example.com/examples"
:headers {"Content-Type" "application/json"}}
(http-client/req! http)
:body :results
(mapv #(do (print "debug variable: ") (clojure.pprint/pprint %) %))))
No hay comentarios:
Publicar un comentario