No worker logs at all when published

I have created a TypeScript API worker which functionally works fine. I have put several key console.log() entries around which work fine when developing with wrangler dev.

Since publishing, I cannot see any logs from the worker via wrangler tail or in the web ui. I am able to call the worker and get expected output but nothing shows in any logs. I have left both the log stream and wranger tail connected to the worker for hours (during active requests) and it still displays nothing. I have set it up on a custom domain route if that makes any difference.

Cheers!

If you tail the Worker in the dashboard, do you not see any request logs at all?


Or is the issue that the “logs” key is empty?
image

Could you try tailing a simple “Hello, World!” script and see if the issue persists?

export default {
    async fetch() {
        console.log('This message should appear in the logs.')
        return new Response('Hello, World!')
    }
}

Just deployed your hello world example and worked fine, then went back to original worker and tried in dashboard log and it is now showing requests! Not sure what has happened but is working now thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.