hyperfiddle

braai engineer 2025-03-22T12:15:24.179429Z

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)

Vincent 2025-03-26T14:53:22.257759Z

cool!

braai engineer 2025-03-22T12:17:35.935529Z

Ah, I see I need to add a target to System.err in the appender: https://stackoverflow.com/a/25935925/198927

braai engineer 2025-03-22T12:38:58.037689Z

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>

braai engineer 2025-03-22T13:16:38.746109Z

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

braai engineer 2025-03-22T13:25:28.051669Z

sweeeet. live debugging of MCP messages in Electric UI (obviously very ugly rn. tx/rx needs to be unified)

Dustin Getz (Hyperfiddle) 2025-03-22T15:37:58.906299Z

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)

🎉 4
Dustin Getz (Hyperfiddle) 2025-03-22T15:55:30.965579Z

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

👍 7
👍🏻 2
💯 1
Dustin Getz (Hyperfiddle) 2025-03-22T17:03:29.415579Z

tutorials are down, failed deploy, unclear if my fault or fly outage, dealing with it

🪰 1
1
✅ 1
nicvenegas 2025-03-23T21:27:15.748369Z

In the meantime, is the v3 tutorial source code available somewhere? Closest I could find is https://github.com/hyperfiddle/electric-v2-tutorial

Dustin Getz (Hyperfiddle) 2025-03-24T11:16:50.698779Z

it will be up today

jdhollis 2025-03-23T01:43:09.527039Z

Ganbatte!