Fork me on GitHub
#cider
<
2019-01-23
>
dhruv102:01:35

in cider, i see a lot of console logs being printed to my clojure repl buffer.

dhruv103:01:11

is there a way to shut it off?

dhruv103:01:07

22:00:25.474 [Polling] DEBUG org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - Group demo committed offset 4 for partition test-0
22:00:25.475 [Polling] DEBUG org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - Group demo committed offset 4 for partition test-0
22:00:25.475 [Polling] DEBUG org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - Group demo committed offset 4 for partition test-0
this keeps repeating.

plexus04:01:11

Seems cider-pprint-eval-last-sexp-to-comment stopped working... it just silently does nothing

plexus04:01:42

seems like it might be an issue with the new pprint middleware, the response only has a value, but not pprinted output

plexus04:01:02

(-->
  id            "220"
  op            "eval"
  session       "1c6adcc6-3d0a-4d18-b86d-474191e3ee4f"
  time-stamp    "2019-01-23 12:06:19.647749420"
  code          "(+ 3 4)
"
  column        1
  file          "/home/arne/github/lambdaisland/kaocha/test/unit/kaocha/plugi..."
  line          35
  ns            "kaocha.plugin.notifier-test"
  print-options (dict ...)
  printer       "cider.nrepl.pprint/pprint"
)
(<--
  id         "220"
  session    "1c6adcc6-3d0a-4d18-b86d-474191e3ee4f"
  time-stamp "2019-01-23 12:06:19.671212640"
  ns         "kaocha.plugin.notifier-test"
  value      "7"
)
(<--
  id         "220"
  session    "1c6adcc6-3d0a-4d18-b86d-474191e3ee4f"
  time-stamp "2019-01-23 12:06:19.671727041"
  status     ("done")
)

dpsutton04:01:51

its hard to step through with the debugger

dpsutton04:01:21

i think the problem is in cider-eval-pprint-with-multiline-comment-handler

dpsutton04:01:03

the result comes back as a value and the handler is supposed to reroute that to a comment writing callback

dpsutton04:01:32

but the handler is only set up to handle output, ie, stdout and stderr and just ignores the value result

dpsutton04:01:24

@plexus on line 557 of cider-eval.el, replace the '() with #'multiline-comment-handler so that the value handler is also a multiline commend handler

plexus04:01:21

thanks! it works now. I saw that but I thought the pretty printed result would be under a different key.

dhruv104:01:24

hello, i am using kafka consumer in clojure and i keep seeing tons of these logs printed to screen: DEBUG org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - Group some-group committed offset 8 for partition test-0

dhruv104:01:52

there are thousands of these, any one know how to turn them off?

dpsutton04:01:04

i think you need to look into configuring your logger

dpsutton04:01:30

your logger is writing to stdout or err which ends up in your repl

dhruv104:01:32

i treid this:

dhruv104:01:37

(set-logger! :level :warn
             :additivity false
             :pattern "%p - %m%n"
             :filter (constantly true))

dpsutton04:01:53

you want to look for a way to get your logging into a file.

dhruv104:01:15

also this:

log4j.rootLogger=INFO
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n

log4j.logger.org.apache.kafka.streams=WARN
log4j.additivity.org.apache.kafka.streams=false

dhruv104:01:21

in my log4j.properties file

dhruv104:01:32

i put it in my respurces folder

dpsutton04:01:37

ah, that ConsoleAppender looks like what is drowning you

dpsutton04:01:08

try asking in #clojure to see if they can help you

dhruv104:01:15

okay perfect! thanks

dpsutton04:01:28

no worries. that general problem should solve your CIDER problem

tianshu10:01:57

have anyone run into this issue? when quit with C-c C-q, there's an error this is what I got in *Messages* buffer

[nREPL] Connection closed
error in process sentinel: nrepl-send-sync-request: Wrong type argument: stringp, nil
error in process sentinel: Wrong type argument: stringp, nil