Fork me on GitHub
#cider
<
2021-04-21
>
piyer07:04:13

I am struggling to get the logging show in cider. I can see the logging in nrepl-server buffer but not in the cider-repl.

piyer07:04:17

any pointers?

bozhidar07:04:08

Perhaps you're not using cider-nrepl or you've set the output redirection to nil?

bozhidar07:04:12

The problem that you're experiencing is that the logger's output got bound to nREPL's terminal output stream.

bozhidar07:04:28

If you take a look in CIDER's issue tracker, you'll see many related conversations.

piyer08:04:32

This is my profile

{:user {:plugins [[cider/cider-nrepl "0.25.11"]
                  [refactor-nrepl "2.5.1"]
                  [lein-pprint "1.3.2"]
                  [lein-cprint "1.3.3"]
                  [lein-kibit "0.1.8"]
                  [lein-ancient "0.7.0"]
                  [jonase/eastwood "0.4.0"]
                  [lein-nsort "0.1.14"]]
        :dependencies [[nrepl "0.8.3"]
                       [org.clojure/tools.namespace "1.1.0"]
                       [org.clojure/tools.reader "1.3.5"]]
        :env {:squiggly {:checkers [:eastwood :kibit]
                         :eastwood-exclude-linters [:unlimited-use]}}}
 :repl {:dependencies [[alembic "0.3.2"]
                       ;; [acyclic/squiggly-clojure "0.1.5"]
                       ]}

 :dev {:dependencies [[lambdaisland/kaocha "1.0.829"]
                      [ring/ring-devel "1.9.2"]
                      [ring/ring-mock "0.4.0"]]
       :jvm-opts ["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory"]
       :repl-options {:init-ns user}
       :source-paths ["env/dev/clj"]
       :plugins [[lein-marginalia "0.9.1"]]
       :aliases {"kaocha" ["run" "-m" "kaocha.runner"]}}}

euccastro10:04:06

I'm getting this trying to install cider-nrepl 0.26.0 snapshot. I'm asking in other channel how to get the latest release instead, just FYI

error in process sentinel: Could not start nREPL server: Downloading: cider/cider-nrepl/0.26.0-SNAPSHOT/maven-metadata.xml from clojars
Downloading: cider/cider-nrepl/0.26.0-SNAPSHOT/cider-nrepl-0.26.0-20210418.130850-4.pom from clojars
Downloading: org/clojure/clojure/maven-metadata.xml from clojars
Downloading: org/clojure/clojure/maven-metadata.xml from central
Downloading: org/clojure/clojure/maven-metadata.xml from maven-central
Error building classpath. Malformed \uxxxx encoding.
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
	at java.util.Properties.loadConvert(Properties.java:574)
	at java.util.Properties.load0(Properties.java:390)
	at java.util.Properties.load(Properties.java:341)
	at org.eclipse.aether.internal.impl.TrackingFileManager.read(TrackingFileManager.java:56)
	at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.read(DefaultUpdateCheckManager.java:511)
	at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkMetadata(DefaultUpdateCheckManager.java:250)
	at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:302)
	at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:181)
	at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:213)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:282)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:229)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:207)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:262)
	at clojure.tools.deps.alpha.extensions.maven$get_artifact.invokeStatic(maven.clj:122)
	at clojure.tools.deps.alpha.extensions.maven$get_artifact.invoke(maven.clj:116)
	at clojure.tools.deps.alpha.extensions.maven$eval1084$fn__1086.invoke(maven.clj:137)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at clojure.tools.deps.alpha$download_libs$fn__811$fn__812.invoke(alpha.clj:462)
	at clojure.tools.deps.alpha.util.concurrent$submit_task$task__502.invoke(concurrent.clj:34)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

bozhidar10:04:36

@euccastro I can't reproduce this and I can think of no recent changes that might have caused this.

👍 3
bozhidar10:04:54

Perhaps the artefact got corrupted for you or something like this.

alexmiller12:04:13

The stack trace indicates the encoding error is encountered while reading a Java properties file while doing an update check while downloading the pom file. I’d wonder about Java version (Unicode support gets bumped periodically), and maybe your platform encoding (although I think Java always uses UTF-8 for prop files), but file corruption is a reasonable guess too. I’ve never seen this error before

euccastro16:04:36

java version is

[email protected]:~$ java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~20.04-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
locale is
[email protected]:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=gl_ES.UTF-8
LC_TIME=gl_ES.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=gl_ES.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=gl_ES.UTF-8
LC_NAME=gl_ES.UTF-8
LC_ADDRESS=gl_ES.UTF-8
LC_TELEPHONE=gl_ES.UTF-8
LC_MEASUREMENT=gl_ES.UTF-8
LC_IDENTIFICATION=gl_ES.UTF-8
LC_ALL=
I'm on Ubuntu 20.04, using spacemacs. this happened after a spacemacs upgrade

euccastro16:04:31

the version I upgraded from is CIDER 1.1.0snapshot (package: ) , and that works fine

alexmiller16:04:32

the only properties file I can think of are the ones like ~/.m2/repository/org/clojure/clojure/resolver-status.properties

alexmiller16:04:38

or I guess maybe ~/.m2/repository/org/clojure/clojure/1.10.3/_remote.repositories

alexmiller17:04:51

from looking at the code, it's probably a resolver-status.properties file

alexmiller17:04:32

not sure if that got corrupted or maybe something troublesome could be written into that if you had a bad repository id

alexmiller17:04:57

I was able to repro the stack trace by modifying one of those files and forcing it to be read. I'd be kind of curious what it looks like if you track down which one is bad

piyer20:04:09

@bozhidar I figured the problem, might save someone's time. It was c3p0 that was messing with the logging.

👍 2
piyer20:04:59

mchange-log.properties

com.mchange.v2.log.MLog=com.mchange.v2.log.FallbackMLog
com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL=WARNING