Fork me on GitHub
#conjure
<
2020-05-09
>
Eugene Tyurin19:05:00

I have a question about logging with conjure - the log window does not seem to capture any of the clojure.tools.logging output. Instead it all goes to wherever the original "lein repl" has been launched. How can this be fixed? I generally like to have my code use (log/info "xyz") for ongoing diagnostics instead of (println "xyz")

Olical10:05:09

Yeah, this is an nREPL / clojure.tools.logging thing more than Conjure, I'm not doing anything extra to capture stdout, it should be captured by default. I would imagine it isn't because the logging is going out under another thread where *out* is bound to stdout, not nREPL's capture.

dominicm11:05:29

@U38J3881W cider does this with no configuration

dominicm11:05:40

There's an operation to redirect console output to nrepl

Olical11:05:02

Oh, I see! Is that something I should be executing all the time on connection or offering to users I wonder 🤔

Olical12:05:33

Just tried out-subscribe but it doesn't seem to make a difference.

Olical12:05:44

I've added :ConjureOutSubscribe and :ConjureOutUnsubscribe to the develop branch. I'm sending the op but it doesn't seem to work at all, maybe it'll work for you! @U012XDRMY6T

Eugene Tyurin17:05:20

Thanks @U38J3881W - I just checked with the latest version, and it works. I only had to fiddle with .lein/profile.clj - add cider/nrepl to :user/:profiles in addition to :repl/:profiles. One day I'll figure those out...