Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add client option to log SQL queries #31

Open
Tracked by #116
RobertCraigie opened this issue Jun 24, 2021 · 2 comments
Open
Tracked by #116

Add client option to log SQL queries #31

RobertCraigie opened this issue Jun 24, 2021 · 2 comments
Labels

Comments

@RobertCraigie
Copy link
Owner

Problem

Performance issues with ORMs can be hard to debug, we should add an option to log generated SQL queries.

Suggested solution

Don't know how this would be implemented as it seems like we'd have to spawn a new thread to capture and then filter the output from the query engine as the query engine logs contain a lot of noise that we don't want to send to users.

@RobertCraigie RobertCraigie added the kind/feature A request for a new feature. label Jun 24, 2021
@janpio
Copy link

janpio commented Aug 27, 2021

Prisma Client JS has something similar with the query log config option: https://www.prisma.io/docs/concepts/components/prisma-client/working-with-prismaclient/logging#log-to-stdout

@RobertCraigie
Copy link
Owner Author

RobertCraigie commented Aug 27, 2021

I have actually already added support for this but it's undocumented as I haven't figured out the difficult part yet which is how to properly filter the query engine stdout logs as there is a lot of noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

2 participants