To see real-time logs in the dashboard, first select your deployed worker, then look for the "Logs" tab, and click on the blue button "Begin log stream". You should see an event for every console.log.
The screenshots are from the "scheduled worker" Application Starter template (npm create wranglernpm create wrangler). github
Yeah I tried all that actually and it didn't work for some reason. But I'm also looking for a better long term solution because I need the logs to persist so that I don't have to babysit on execution. Any ideas on it? Maybe dump into KV?
Yeah, lots of options, depending on the volume and retention and how you want to query etc. KV is more for low-latency reads, R2 for blobs. Tail workers are a nice way to send logs and exceptions to a log store, without changing the worker code. You may also want to try baselime if the free 7-days retention works for you.
To celebrate Builder Day 2024, we’re shipping 18 updates inspired by direct feedback from developers building on Cloudflare. This includes new capabilities, like running evals with AI Gateway, beta products like Queues and Vectorize graduating to GA, massive speed improvements to KV and Workers AI, pricing simplifications, and bringing key featu...