I want to make an Electric UI for https://github.com/theronic/modex, but I need to squash all Electric logs from going to stdout (or redirect to stderr) because it messes with the MCP transport over stdio.
How can I redirect all logs to stderr? Would changing the appender-ref https://gitlab.com/hyperfiddle/electric3-starter-app/-/blob/main/src-prod/logback.xml?ref_type=heads#L10 from "STDOUT" to "STDERR" suffice? (haven't tried yet)
cool!
Ah, I see I need to add a target to System.err in the appender: https://stackoverflow.com/a/25935925/198927
Hmm, I updated src-prod/logback.xml to the following, but Electric is still logging to stdout when I build & run production uberjar:
<!-- Options: -->
<configuration>
<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
<target>System.err</target>
<encoder>
<pattern>%highlight(%-5level) %logger: %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDERR" />
</root>
</configuration> OK I think got it working with nuclear option (System/setOut System/err) but will confirm. Not sure what's happening with the unboxed math errors...hopefully MCP client is ignoring them
sweeeet. live debugging of MCP messages in Electric UI (obviously very ugly rn. tx/rx needs to be unified)
published new electric snapshot, no known breaking changes • e/Offload is restored, it had been disabled (via a no-op impl) due to a missionary bug. This is not that well tested yet • fix electric-dom3 bug in virtual scroll use case • fix dom/On regression • electric-forms4 - fix glitches • electric-forms5 - many changes, probably breaking, not sure if ready yet, follow what's in the tutorials (which I am deploying shortly)
Regarding the tutorials - we are preparing to rewrite them, with each passing week the later tutorials' code decoheres from the prose, and also there is too much friction to write and maintain them, I am planning to change our approach
tutorials are down, failed deploy, unclear if my fault or fly outage, dealing with it
In the meantime, is the v3 tutorial source code available somewhere? Closest I could find is https://github.com/hyperfiddle/electric-v2-tutorial
it will be up today
Ganbatte!