Those API options should enable

Those API options should enable workerd's logging. Wrangler actually uses the DevTools inspector protocol for logging instead.
14 Replies
TravisFrank
TravisFrank•2y ago
FWIW I can' t seem to get logs via chrome://inspect, and when I manually hit http://127.0.0.1/PORT/json, the devtoolsFrontendUrls all give me the attached error
No description
TravisFrank
TravisFrank•2y ago
Yep, And I get workerd/server/server.c++:2431: info: Inspector is listening
MrBBot
MrBBotOP•2y ago
Do you see info: Inspector client attaching [core:user:] too? Make sure you inspect the core:user service, not core:entry
TravisFrank
TravisFrank•2y ago
👀 No, I don't see any further workerd log after info: Inspector is listening What I'm doing now is hitting the json endpoint: curl "http://127.0.0.1:9000/json" | jq '.[]', then pasting devtoolsFrontendUrl into Chrome. That gets me to the "WebSocket disconnected" above From the first core:user:<WORKER_NAME>
MrBBot
MrBBotOP•2y ago
Hmm ok, I see WebSocket disconnected when I do that too, but not if I go to chrome://inspect and click the inspect link for the core:user service
TravisFrank
TravisFrank•2y ago
The core:user services aren't appearing for me in dev tools at all
MrBBot
MrBBotOP•2y ago
Could you try inspectorPort: 9229 instead?
TravisFrank
TravisFrank•2y ago
Aha! They appear! And if I understand correctly, there's no convenient way for me to collate all the logs from the various services into one DevTools console or my terminal?
MrBBot
MrBBotOP•2y ago
Unfortunately not
TravisFrank
TravisFrank•2y ago
Rats Then count me in for a Docker Compose-style solution, I'd love to get everything in one process.
MrBBot
MrBBotOP•2y ago
You could try build your own DevTools proxy that collated everything and re-exposed a single DevTools server, but that's probably quite a bit of work
TravisFrank
TravisFrank•2y ago
Yeah, that's immediately where my head goes, but I think for now this is good enough. Gotta get back to working on features. Really appreciate the help @mrbbot, you're killin' it on Miniflare! If you do end up pursuing a compose approach, I'm happy to help however I can
MrBBot
MrBBotOP•2y ago
Thanks! 😃
Want results from more Discord servers?
Add your server