mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2025-01-05 22:58:49 +00:00
Lower level of sqxl's logs.
This commit is contained in:
parent
0c2833defd
commit
39cb4c5973
3 changed files with 6 additions and 1 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2630,6 +2630,7 @@ dependencies = [
|
|||
"claim",
|
||||
"config",
|
||||
"fake",
|
||||
"log",
|
||||
"once_cell",
|
||||
"quickcheck",
|
||||
"quickcheck_macros",
|
||||
|
|
|
@ -20,6 +20,7 @@ config = { version = "0.10.1", default-features = false, features = ["yaml"] }
|
|||
sqlx = { version = "0.5.5", default-features = false, features = [ "runtime-actix-rustls", "macros", "postgres", "uuid", "chrono", "migrate", "offline"] }
|
||||
uuid = { version = "0.8.1", features = ["v4"] }
|
||||
chrono = "0.4.15"
|
||||
log = "0.4"
|
||||
tracing = "0.1.19"
|
||||
tracing-futures = "0.2.4"
|
||||
tracing-subscriber = { version = "0.2.12", features = ["registry", "env-filter"] }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use serde_aux::field_attributes::deserialize_number_from_string;
|
||||
use sqlx::postgres::{PgConnectOptions, PgSslMode};
|
||||
use sqlx::ConnectOptions;
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
|
@ -42,7 +43,9 @@ impl DatabaseSettings {
|
|||
}
|
||||
|
||||
pub fn with_db(&self) -> PgConnectOptions {
|
||||
self.without_db().database(&self.database_name)
|
||||
let mut options = self.without_db().database(&self.database_name);
|
||||
options.log_statements(log::LevelFilter::Trace);
|
||||
options
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue