Edge Functions Logs Don't Work

We are using alot of Edge function in our NextJs App, but the Edge Functions log doesn’t show anything. It is simply always blank. We just had a edge function timeout for some reason, even though the actual server where we get the data shows a 200 response. We only saw this do to an error message on the front end of the website, but nothing shows up in the logs. It’s impossible to debug. Also, there is no usage shown for Edge functions at all. By contrast the logs for regular functions work fine and are very helpful for debugging. How do we get Edge functions logs to actually work?

Hi @osseonews

Is this an edge function you built? If so, it should output console.log statements and similar as the function executes.

Can you show me the contents of that function?


1 Like

We have console.log everywhere in our code. And we also console also the errors. Virtually bothing shows up in the Edge logs. Once in awhile something will appear. but, in general, the logs are just empty for edge. As for sharing the code, we have alot of code, thousands of lilnes. We couldn’t share it here obviously in public and I’m not sure how we could share our entire codebase. The code works fine. It’s just that we never see logs and randomly an error pops up, exactly as the error in this post (Sporadic errors: "This edge function has crashed - The deployment failed while serving the request") - the screenshot there is exactly what we see. But nothing in the logs, so we can’t tell at all what is happening or why and we see no errors at all on our data providers. We are using NextJs Edge functions. from what I can tell Netlify transforms these into Deno functions on build, so seems like something with Deno??

Hi @osseonews,

Which site is this about?