vors
vors3y ago

I think I don t see logs from the

I think I don't see logs from the actions that run through the scheduler....
8 Replies
vors
vorsOP3y ago
I have this code in the action
export default action(async ({ auth, runMutation, runQuery }, image_id: Id<"images">, userPrompt: string) => {
console.log(`[inference] Started inference for image=${image_id.toString()} with prompt=${userPrompt}`)
...
export default action(async ({ auth, runMutation, runQuery }, image_id: Id<"images">, userPrompt: string) => {
console.log(`[inference] Started inference for image=${image_id.toString()} with prompt=${userPrompt}`)
...
So first thing is a log line And I call it like this
await scheduler.runAfter(1, "actions/inference", image._id, userPrompt)
await scheduler.runAfter(1, "actions/inference", image._id, userPrompt)
rebecca
rebecca3y ago
Thanks for reporting, that looks like a bug to me. I'll look into it and get back to you! Just to confirm, you aren't able to see the logs from the scheduled action on the console in the browser when you inspect right? I tried reproing it and saw that the log was missing in the browser but it does show up in the "Logs" tab of the dashboard. Hopefully you can use that to debug for now!
ballingt
ballingt3y ago
Hey @vors, where are you looking for these logs? In the browser console, or in the Convex dashboard logs pane?
vors
vorsOP3y ago
In the dashboard from the server. I assume they run remotely?
ballingt
ballingt3y ago
Yep! Just double-checking, because it would be expected that they wouldn't show up in the browser.
rebecca
rebecca3y ago
@vors can you share a screenshot of the logs on the dashboard?
vors
vorsOP3y ago
@rebecca I just tried to repo and I can see them now thank you
rebecca
rebecca3y ago
Awesome, glad to hear that!

Did you find this page helpful?