Fork me on GitHub
#calva
<
2022-10-23
>
Kari Marttila19:10:03

Just tested Calva with one of my re-frame exercise and everything works like charm. I'm falling in love with Calva. 🙂

❤️ 1
Kari Marttila19:10:03

... and I have alt+j in my muscle memory, therefore:

{
    "key": "alt+j",
    "command": "calva.runCustomREPLCommand",
    "when": "calva:connected && calva:keybindingsEnabled && editorLangId == 'clojure'",
    "args": {
      "ns": "user",
      "snippet": "(integrant.repl/reset)",
    }
  },

bringe03:10:45

That’s a good use of a custom repl command simple_smile

Kari Marttila19:10:57

Except one thing. If I start the the shadow-cljs build, and then connect to the shadow-cljs repl using:

"calva.replConnectSequences": [
      {
        "name": "backend + frontend",
        "projectType": "shadow-cljs",
        "cljsType": "shadow-cljs",
        "menuSelections": {
          "cljsLaunchBuilds": [
            ":app"
          ],
          "cljsDefaultBuild": ":app"
        }
      },
... I can see in the console (terminal in which I started shadow-cljs), the clojurescript related log messages. But how do I see the clojure related log messages? Is the only way to configure the clojure backend logging to a file and then tail that file?

Kari Marttila20:10:31

I mean if I have a logback configuration that echoes log messages to console:

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
			<Pattern>
				%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
			</Pattern>
		</encoder>
	</appender>

pez12:10:45

I'm also interested in how to do this. It's not clear to me why it doesn't just work..

wevrem13:10:49

I was noticing something similar a while ago: ClojureScript logs printing okay, but Clojure log calls producing nothing. I think what happened is the shadow-cljs server instance had become detached from my terminal. When I found and killed that server process and started everything up again, I had both logs displaying again in the same terminal.

pez13:10:19

Thanks, @UTFAPNRPT. That explains why I have seen it both working and not working. 😃

Kari Marttila17:10:15

Ah, so, it is possible to have both backend and frontend logs displaying in the same terminal! I must investigate this a bit myself as well.

Kari Marttila17:10:26

Damn. It actually works like that. Good!

Kari Marttila17:10:47

So. I have been testing Calva in quite a few use-cases now and written three blog posts regarding those customizations. And now I finally have pretty good confidentiality that I can do everything using VSCode/Calva that I could previously do with IntelliJ/Cursive.

wevrem19:10:16

Did you mean to say ‘confidence’? 🙂 Since you are publishing all this in blog posts, you aren’t really being confidential, which is good for all of us that benefit from reading your posts.

Kari Marttila19:10:12

Lost in translation. 😀

alekszelark06:10:31

I use lein + shadow-cljs, and never run into this problem with logs.