Cloudflared / workers logs?

Is there any documentation on getting logs from workers that throw exceptions? I saw a reference to cloudflared but those docs don’t seem to go over what I’m trying to do. (Not using wrangler so wrangler tail wouldn’t work here…)

Thanks,
Loren

1 Like

This is something i would also like to know.
Searched for this DOCs too and could not find them.
Would be great to know how to get the exception output for a specific ray ID !

In the User Dash Page should be some kind of input field where a Exception Ray ID can be entered and the Exception Error Message retrieved but could not find anything like this.

1 Like

Currently wrangler tail or re-creating them in the online editor is the only method for receiving these, but I think there’s things in the works to add another method.

It’s worth it to get setup to use wrangler just for logs, so I would recommend putting in that effort at this point.

try...catch your suspicious code and send the exception and any request details you need to the logging service of your choice (as described here) with event.waitUntil?

Pull the ray ID from the headers and include it in above logging fn. Or send the whole request payload over to your logging service so you can query the contents of the request dynamically.

1 Like

WOOOW Thank you chasers for this helpfull tip.
Will have to try it out !

You helped me with this very much.
Bookmarked your Answer !