cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
st3fan 2020-11-14T15:17:09.497700Z

n00b question: i am running my web api inside the repl now - but how do i log or print things? i am debugging something and I would like to print a few values

bozhidar 2020-11-14T15:42:16.498600Z

Just use regular logging/printing functions. If some log output doesn't appear in the REPL buffer you can check *nrepl-server*.

st3fan 2020-11-14T16:49:33.499Z

Oh I see it appears but in a really odd place in the repl …

st3fan 2020-11-14T16:49:44.499100Z

st3fan 2020-11-14T16:52:42.499900Z

And println from my app code doesn’t appear at all - maybe Jetty captures stdout?

st3fan 2020-11-14T16:54:26.000400Z

Ok that may be caused by the code not actually properly reloading. More to explore!

st3fan 2020-11-14T16:56:10.001300Z

Maybe I am doing this the wrong way. I started a REPL and then started Jetty - but maybe I should keep using lein run but add a repl to it and then connect to that?

dpsutton 2020-11-14T17:14:34.002Z

That is basically what cider is doing. Calling lein repl and connecting you to that

dpsutton 2020-11-14T17:15:01.002500Z

Have you opened the nrepl buffer mentioned above?

st3fan 2020-11-14T17:19:58.003400Z

Yeah there is an unrelated trace in there but nothing else. But I think I have another problem .. Even though I compile functions, those changes don’t seem to actually happen in my running server. I’ll explore that a bit more first.

dpsutton 2020-11-14T17:21:14.005300Z

Find where your routes are def ed. You probably need to reevaluate that or perhaps start using var refs there to make sure it’s always using new code. If you have questions about that ask in beginners or clojure and you’ll get some good explanations

st3fan 2020-11-14T17:25:29.005800Z

Thank you