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

Make sqlx logging configurable for seaorm-rocket #1192

Merged
merged 1 commit into from
Nov 6, 2022

Conversation

jayay
Copy link
Contributor

@jayay jayay commented Nov 5, 2022

PR Info

New Features

  • sea_orm_rocket::Config was extended by the boolean field sqlx_logging, which defaults to true if not set and can be used to disable query logging to the console. This comes in handy if the query logging is not desired such as fuzzing environments or very busy deployments. The value needs to be forwarded into the sea_orm::ConnectOptions struct by the user of this library, as shown in the changes to examples/rocket_example/api/src/pool.rs.

Bug Fixes

Breaking Changes

  • This PR includes a breaking change. sea_orm_rocket::Config got a new pub field.

Changes

@tyt2y3
Copy link
Member

tyt2y3 commented Nov 5, 2022

Awesome, although sadly this is a breaking change

@jayay
Copy link
Contributor Author

jayay commented Nov 5, 2022

@tyt2y3 Oh no, I didn't pay attention to that! There's no way to implement this as a non-breaking change, or am I missing anything? Do you think the Config struct could have pub(crate) fields in the future (and a ::new() function), so that new fields can be added gradually?

@tyt2y3
Copy link
Member

tyt2y3 commented Nov 6, 2022

It's okay. It's breaking because of the pub field in struct, so it's part of the design. I will release a new version of that crate and update the examples. Thanks for the contribution!

@tyt2y3 tyt2y3 merged commit 9952aa6 into SeaQL:master Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants