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

UnsafeLogged added to report missing fields #789

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrabe89
Copy link

@mrabe89 mrabe89 commented Dec 7, 2021

Hi, - We use your great sqlx library in our projects.
I added an optional logging functionality to your unsafe skips to report if a destination is missing, but to still continue.
I'm not sure if this is the best way to do that, but if not please provide me with feedback and I will work your suggestions in.

Signed-off-by: Matthias Rabe <matthias.rabe@abs-rz.de>
@gregwebs
Copy link

wow, I was just thinking about making this change and now I see others have needed it for years.
The existing error is often helpful, but not for a zero-downtime deploy- in that case this error needs to be turned off to avoid further complicating the deployment. This issue has been raised already.

Given the simple logging needs here, I think it makes sense to use the writer instead of an actual Log instance. Using slog is tempting, but not sure if there is a way to make that backwards compatible with older versions of Go.

@dlsniper dlsniper added the needs testing The PR needs more testing before being accepted label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs testing The PR needs more testing before being accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants