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

sqlx_logging_level, a wrapper around sqlx::ConnectOptions::log_statements #800

Merged
merged 2 commits into from
Jun 26, 2022
Merged

sqlx_logging_level, a wrapper around sqlx::ConnectOptions::log_statements #800

merged 2 commits into from
Jun 26, 2022

Conversation

SandaruKasa
Copy link
Contributor

@SandaruKasa SandaruKasa commented Jun 17, 2022

PR Info

  • Closes: None

Adds

  • An ability to change level at which sqlx logs statements.
  • New methods:
impl ConnectOptions {
    ...
    
    pub fn sqlx_logging_level(&mut self, level: log::LevelFilter) -> &mut Self { ... }

    pub fn get_sqlx_logging_level(&self) -> log::LevelFilter { ... }
}

Changes

  • ConnectOptions' size has changed, I don't think it's a breaking change
  • log is now a direct dependency
  • The fact that log::LevelFilter::Off exsits makes it possible to deprecate
    pub fn sqlx_logging(&mut self, value: bool) -> &mut Self { ... }

in future.

Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only nitpick might be to use the = { version = } syntax

@SandaruKasa
Copy link
Contributor Author

Only nitpick might be to use the = { version = } syntax

Done 31bc9e9

@SandaruKasa SandaruKasa requested a review from tyt2y3 June 19, 2022 14:48
@tyt2y3 tyt2y3 merged commit 4f26b4a into SeaQL:master Jun 26, 2022
@tyt2y3
Copy link
Member

tyt2y3 commented Jun 26, 2022

Actually, I consider 800 to be a good number :)

billy1624 added a commit to SeaQL/seaql.github.io that referenced this pull request Jul 13, 2022
tyt2y3 added a commit to SeaQL/seaql.github.io that referenced this pull request Jul 17, 2022
* Custom join condition (SeaQL/sea-orm#793)

* Migration does not depend on entity crate

* Define integer enum with repr[x] syntax

* Document datatype mappings (SeaQL/sea-orm#772)

* Cursor pagination (SeaQL/sea-orm#754, SeaQL/sea-orm#822)

* (de)serialize custom JSON types (SeaQL/sea-orm#794)

* Generate new migration file (SeaQL/sea-orm#656)

* Skip generating entity file for specific tables (SeaQL/sea-orm#837)

* Generate entity with date time crate option (SeaQL/sea-orm#724)

* Drop `SelectTwoMany::one()` method (SeaQL/sea-orm#813)

* Datatype mappings of primitives (SeaQL/sea-orm#850, SeaQL/sea-schema#75)

* Join with table alias (SeaQL/sea-orm#852)

* SQLx logging level (SeaQL/sea-orm#800)

* Insert with on conflict (SeaQL/sea-orm#791)

* Migrate generate should take file name as argument instead of option (SeaQL/sea-orm#870)

* Upgrade docusaurus to 2.0.0-beta.22

* What's new in SeaORM 0.9.0

* Move migration section forward

* Rename "Generating Database Schema" section to "Generating SeaQuery Statement"

* Fix broken links

* Edit

* Edit

* Edit

* Edit

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants