25 Replies
Hi @Chad Maycumber! Logs from actions (and errors from actions) should show up both in the browser console and the Convex dashboard.

Thanks for some reason printing objects to the console don't show up on the right side pan for me
Maybe it's my browser? They also get truncated in scape underneath the function
space*
Sounds odd, could you share what this looks like or say more about the truncation? And are these logs showing up in the dashboard but not the browser, or not in either place?
Here's the side pan and the piece of code


I can get it to print with JSON.stringifying the response.data object
Thanks for the quick response btw much appreciated
Ah ok, likely this has to do with our console.log implementation not doing a good job stringifying
What is that response object? I was guessing Axios but when I try to repro an axios response.data object can be logged fine

I think it is axios under the hood, but I'm using openai's node library
do you know what data is?
maybe a simple object, or a string? If it's an array buffer that might be a type we don't do a good job with
also I see logs in the logs, but not in that side pane
if that's the other thing you were asking about
Let me get that for you
Also this is the first time I'm using convex and it's pretty awesome. Does this work in react native?
It does! We just added an example at https://github.com/get-convex/convex-demos/tree/main/react-native
GitHub
convex-demos/react-native at main · get-convex/convex-demos
Demo apps built on Convex. Contribute to get-convex/convex-demos development by creating an account on GitHub.
Also is this best practice for deletes? Sorry for the side track

That's great, yeah — when they're expressed in parallel like that we can optimize them
The response type was an object
I think we print basically the JSON.stringify(obj) for objects, but if it were an object with a prototype with lots of methods (aka an instance of a class) then that's not very useful
If it's easy to check, could you check the
response.data.constructor
?
we have some ideas to do better here in general, but I want to check these ideas would actually fix this for youFor sure.
If it helps too here's a stringified response taken from the convex UI:
This is what the dashboard prints normally, or this is what it prints after you stringify it in your code?
Seems like you may have been correct here's the constructor: 'Response: ' [Function: Object]
Got, ok we'll improve this, thanks for reporting!
Which openai wrapper are you using, so I can repro?
oh you said it's openai's so I assume the official one
not one of the unofficial libraries that scrapes it
assuming it's this one https://www.npmjs.com/package/openai
Correct
Hm I'm having trouble reproing this, when I log response or response.data they look ok


Would you be willing to share your code? Just the openAI bit may be enough. You can DM me here or email tom@convex.dev
Yeah sure
Turns out (we worked through this together) that logs are showing up in the developer console of the webapp where Convex is being used, it's just in the dashboard that logs are being cut off and not appearing at all in the details view. We'll fix this, thanks for reporting!