#wrangler tail --version-id does not show any logs

7 messages · Page 1 of 1 (latest)

fallen pagoda
#

I am trying to look at logs for a specific Worker version that is not yet deployed (to debug/validate before going live) and tried using

wrangler tail --version-id <version>

However it never shows any logs. All I see is:


 ⛅️ wrangler 4.38.0
───────────────────
Successfully created tail, expires at 2025-09-19T04:54:27Z
Connected to koassets, waiting for logs...

I copy pasted the version from the cloudflare dashboard to be sure. I also tried the preview alias I am using on that version in place of <version> but same (and no error).

The worker has worker logs enabled. In the dashboard I can see the logs for the deployed version (but only that one).

Any ideas?

Thanks,
Alex

torn oriole
#

Feels like we could do a better job here indicating such in wrangler 😅

#

What you could do is a gradual rollout with 100% of your live version and 0% of the version you want to test, and use the version override header to force your previewed version:

https://developers.cloudflare.com/workers/configuration/versions-and-deployments/gradual-deployments/?utm_source=chatgpt.com#version-overrides

But yeah if you’re using the preview url, you straight up won’t get logs

Cloudflare Docs

Incrementally deploy code changes to your Workers with gradual deployments.

fallen pagoda
#

ok thanks. It is weird that wrangler tail even has a --version-id argument then 😄

#

my workaround was to temporarily add a response header with the information I wanted to log/debug

torn oriole
#

Well if you’re using gradual rollouts then you can have multiple versions deployed. Glad you got it working!