Runtime logs not showing #4559
Replies: 14 comments 4 replies
-
Now it's back. |
Beta Was this translation helpful? Give feedback.
-
And now it's gone again. |
Beta Was this translation helpful? Give feedback.
-
It turned out that the Log sometimes combines all So, sometimes I get The prefered behaviour would be to have messages shown one by one, for two reasons:
For internal Vercel debugging:
|
Beta Was this translation helpful? Give feedback.
-
After a few too many hours spent on this issue ... It looks like Vercel deployment has a random element build in. Most of the time you get a deploy where all messages are combined, and some time you are lucky and get a line by line. I don't love that deploys behaves differently from each other. For anyone reading this with the same issue I found two workarounds:
|
Beta Was this translation helpful? Give feedback.
-
For me, the logs never seem to work. I tried setting up Sematext hoping that logs would appear there, but no success |
Beta Was this translation helpful? Give feedback.
-
Related to this thread, in my case a Python runtime -- no logs are showing up when using Python's It's almost like the Vercel production runtime is taking over python logging in some way, or setting a level to something above INFO! On a tangential note, Vercel documentation is sparse on what to expect with user generated / custom log messages, how to access them, constraints etc. |
Beta Was this translation helpful? Give feedback.
-
@Martin-Carlsson so you're saying reroll the deployment and check the log hoping it will show up what you need? That seems.. brittle.. |
Beta Was this translation helpful? Give feedback.
-
Similar, though not the same as, this issue: vercel/next.js#61240 |
Beta Was this translation helpful? Give feedback.
-
I have encountered a similar problem. I have a serveless function that runs through a Cron Job every minute. To check that it will work, I have added a console.log, console.error and console.info. Apart from that, it returned a response with a status of 200. With this I couldn't see any log in Vercel. However, if I return a response with a status other than 200 (I have only tried with 400 and 500), It seems that the error does reach Vercel and along with it, all the previous logs. Therefore, the current behaviour is that until a response with an error code arrives, the logs that would have been in this execution do not arrive. Can anyone confirm if this is a bug or an expected behaviour? |
Beta Was this translation helpful? Give feedback.
-
Anyone got more insight into handling of logging? I been debugging what I thought was a race condition for quite a while, but then realized I probably just messed up some supabase queries. Before I actually make any change to it to fix the issue, I wanted to prove it via data and added some additional debugging to my function. Now, after finding this post I tried to --follow the logs, but it does not retrieve all the logs. Many are missing. When I go back into Vercel and check its logs, I can see a lot more but even there, many are missing (locally in debug mode I will see them for example). My app is Next.js and using all the regular deployment functionality in Vercel, nothing special. To show, here is the --follow: And here is same section in Vercel (don't let the timestamps fool you, the --follow I believe is in UTC/GMT and web site is in 24 hour/local timezone: One issue that stands out is using console.warn(). I use it a lot for debugging but it seems there is a disconnect between the website, the CLI and node.js with warn/warning.
The filter is also slightly broken at least with auto-complete as warning does not come up as an option though is there as a text hint: So based on the above, I will just switch out to console.error which isn't ideal, to see if that helps my debugging here in general. Figured I would just ask if anyone had more insight but also share this as it wasn't obvious if your just in the web app and see "warning" and just rolling with it like I was by mistake. Update: |
Beta Was this translation helpful? Give feedback.
-
No logs, ever, on every deployment. |
Beta Was this translation helpful? Give feedback.
-
This seems to be correct. In my case, the function times out and I get a 504 without any of the error logs because the 504 is generated by Vercel. So its impossible to use logs to debug. It's amazing that we have to figure this stuff out through trial and error rather than Vercel communicating it. Moving my API to Firebase. |
Beta Was this translation helpful? Give feedback.
-
For me my computers clock was out of sync with the server |
Beta Was this translation helpful? Give feedback.
-
Page to Investigate
https://vercel.com/martin-carlsson/meritmeadow/logs?page=1&timeline=past30Minutes&startDate=1697867805158&endDate=1697869605158
Steps to Reproduce
Runtime logs not showing from
console.log
are not showing in Vercel Logs dashboard.The Vercel Logs dashboard are showing other logs like [GET] request, but everything that comes from
console.log
are not showing.The logs were showing fine yesterday.
Beta Was this translation helpful? Give feedback.
All reactions