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

Log the generated SQL statement #44

Open
alinz opened this issue Aug 16, 2022 · 2 comments
Open

Log the generated SQL statement #44

alinz opened this issue Aug 16, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@alinz
Copy link

alinz commented Aug 16, 2022

Hello @zombiezen,
Thanks for this repo, been using this library in my side projects for couple of months now. I have one question, Is there anyway I can get the the generated SQL statement print it out to stdout? or possibly passing a logger?

Thank you

@zombiezen zombiezen added the enhancement New feature or request label Aug 19, 2022
@zombiezen
Copy link
Owner

I have been thinking of introducing a diagnostic hook for a while, but would need to do some design on what the API would look like. I'm imagining something similar to the Tracer type in David Crawshaw's package, but I would want it to:

  • Have some amount of committed structure so someone who is only interested in logging SQL statements can do that without getting other diagnostics
  • Be compatible with, but not depend on, OpenTelemetry (which would imply needing to be Context-aware)

@alinz
Copy link
Author

alinz commented Aug 21, 2022

Would love to work on that, if you need some help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants