a year ago
Hi,
Our MedusaJS deployment isn’t displaying many console.log() entries in the log viewer, especially those from subscribers or scheduled jobs. We can see all these logs in our local deployment.
I recently saw a post from two days ago mentioning a missing log issue with the V2 runtime (https://help.railway.app/questions/missing-expected-logs-in-log-viewer-dc9baff3). How can we determine if this is the problem we’re facing or if there’s another issue?
Thanks
7 Replies
a year ago
Definitely not an issue with your app, it's an issue with the V2 runtime, unfortunately I do not have an update besides the one I gave in the thread you linked.
You may switch back to the legacy runtime in your service settings until this is resolved.
a year ago
We're tracking this ticket internally and hope to have the issue resolved soon. Thanks both
a year ago
Thanks @brody and @melissa. I have switched to the legacy runtime and it started showing more logs but still missing quite a bit of logs.
For example, I have a medusa scheduled job that runs every 1 hour. It prints number of items it processed in that run. For the last 1 day it has correctly run 24 times and I can see that based on the db updates. But it printed the logs only 3 times (screenshot attached).
Is there some scenarios where the entire log will not be captured? Can we force it to capture all the logs?
Attachments
a year ago
The legacy runtime has no known issues with logs, as long as you are printing to stdout/stderr unbuffered they will print.
a year ago
That's strange. The scheduled job in the attached screenshot prints using console.log. The job runs every hour but as you see in the screenshot I get the log 3-4 times a day.
a year ago
We would recommend you definitely use the cron for anything like this. Jobs that run using application level stuff, we can't debug. You'll want to check with the Template author to see if there's any issues here
a year ago
Sorry for the late reply, but all known logging issues on the v2 runtime have been fixed.
4 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 4 months ago
