Local logging on by default sometimes
Does
npx convex dev
use any sort of inference to turn on logging by chance? It seems to print logs without the --tail-logs
flag depending on how it's run.
Here are three npm scripts I use:
The first script just runs the other two concurrently.
- If I do npm start
, I get logs, even though there's no --tail-logs
flag
- If I do npm run convex-dev
, I get no logs, as expected
I'd like to run npm start
with no convex logs and then log for the backend in a separate cli, but I can't get npm start
to not log for convex.8 Replies
This would be super surprising. Can you share a screenshot/copy of the "logs" you're seeing when running
npm start
?On further investigation, logs are printing from Convex with just
npm run expo-start
:
I'm obviously missing something silly here, but that command is just running expo local dev, how is this possible?
Does Convex propagate logs through to the client
useQuery()
/useMutation()
under any circumstance?Could Expo be propagating frontend (console) logs to the terminal?
I think RJ is correct, the format is the one the JS clients use, not the CLI
Our clients don't have an option to turn the logs off, but you might be able to tell Expo to not forward them
So logs in convex functions do propagate through to the frontend automatically?
Eg., if this was in the browser, Convex logs would print to the browser console?
If so is there a way to have backend-only logs
oh I bet this is only dev isn't it
Yeah only dev I believe
My feedback would be that controlling logs in local dev would be helpful, and outputting server logs to the browser should be optional.