staps
staps9mo ago

Is it possible to disable console logs in browser for production but show them on Convex dashboard?

Hi guys, kudos for building such an amazing platform. I'd like to know if there's a possibility to disable all console logs / errors from Convex for production build? I tried to disable them from next.config.mjs like below but they don't seem to affect Convex logs. I don't like the users to see the Convex function names etc when some error occurs. Thanks!
compiler: {
removeConsole: process.env.NODE_ENV === "production",
},
compiler: {
removeConsole: process.env.NODE_ENV === "production",
},
4 Replies
ari
ari9mo ago
Hey @staps! Logs in your production environment do not get sent to the client, no additional configuration is needed. Have you observed different behavior?
staps
stapsOP9mo ago
I see. I saw one error coming up. Maybe I was running on dev. I will check and confirm. thanks!
ari
ari9mo ago
Got it! Yup feel free to follow up if you notice that on prod again and we’ll investigate
jamwt
jamwt9mo ago
@staps in addition, in your production deployment, we don't send detailed backtraces to the browser either

Did you find this page helpful?