shadow-cljs

braai engineer 2025-03-22T12:55:02.568629Z

How do I prevent shadow-cljs from logging to stdout? It's messing with my MCP server, which uses stdio. Need to redirect any logs to stderr, or to a file. I tried {:log {:level :error} ...} in shadow-cljs.edn, but it says "invalid log level" on build.

thheller 2025-03-22T15:05:29.441359Z

why is shadow-cljs running in your mcp server? or what logs are you talking about?

braai engineer 2025-03-22T15:05:58.022839Z

my mcp server is running in electric

thheller 2025-03-22T15:07:26.537749Z

not sure how that is relevant to what I asked?

braai engineer 2025-03-22T15:07:51.645489Z

driving will reply later :)

thheller 2025-03-22T15:09:41.589849Z

this is the namespace handling most of the of the logging https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/jvm_log.clj

thheller 2025-03-22T15:09:55.201199Z

I guess you could copy it into your classpath and overwrite whatever you need

thheller 2025-03-22T15:10:18.924959Z

but there are some random println all over the place that aren't exactly logging

thheller 2025-03-22T15:10:55.641519Z

but yeah need to know what log exactly you are talking about to give any kind of answer