-
Notifications
You must be signed in to change notification settings - Fork 184
added parameter bind logging #309
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
Conversation
46a4317
to
7b3b311
Compare
Thanks for submitting a pull request. Care to attach a snippet as comment how the logs would look like? I'm considering to slightly tweak the logging behavior. Since we have already a query logger, we might want to keep the actual SQL and the parameters somewhat close together so one can reason about the query and its parameters. Let's see how the log output would look like before we continue here. |
Hi. This is how the output looks like for me:
Could you please provide a little bit more details, on how you see it accomplished? Thanks! |
where I see a problem with the above (apart from off-by-one numbering) is what might happen in mass-parallel scenarios. So arguably, if we could put some unique query execution id into both QUERY and PARAM logger output so user could correlate those together, would be great. However at the moment I have no idea how to achieve this.. |
I believe we need some connection id in log, in every log, not only bindings, that would help a lot. |
FYI, If you want to log bindings and query all together(also connection id), r2dbc-proxy provides such capability. |
The log output looks good already. I second @Squiry's view, that we need to add context. Single-process logs are easy to understand, but in production environments we get way more log output than that. In the SQL Server driver, we've introduced I'll be off for around two weeks, I can have a look afterward. Alternatively, feel free to check out the SQL server driver and introduce the contextual log message factory. |
We have a processId that can be used as a connection id provided by backend, but we have it only after connection succeed. |
I filed #339 to capture more context so we can correlate bind calls to the actual connection. |
Thank you for your contribution. That's merged, polished, and backported now. |
Thanks @mp911de ! |
closes #278
Make sure that:
Not sure what tests should I provide along with this?
Issue description
#278
New Public APIs
none
Additional context
Query Parameter values are now visible in the logs