Change database log level to debug
This commit is contained in:
@@ -14,6 +14,7 @@ serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tokio = { version = "1.47.0", features = ["full"] }
|
||||
sea-orm = { version = "2.0.0-rc", features = [ "sqlx-postgres", "sqlx-mysql", "sqlx-sqlite", "runtime-tokio-rustls", "macros", "mock", "with-chrono", "with-json", "with-uuid", "sqlite-use-returning-for-3_35", "mariadb-use-returning" ] }
|
||||
log = "0.4.28"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use log::LevelFilter;
|
||||
pub use sea_orm::ConnectOptions;
|
||||
pub mod generated;
|
||||
|
||||
@@ -13,7 +14,8 @@ pub async fn get_connection<T: FnOnce(&mut ConnectOptions)>(
|
||||
.connect_timeout(std::time::Duration::from_secs(8))
|
||||
.idle_timeout(std::time::Duration::from_secs(8))
|
||||
.test_before_acquire(true)
|
||||
.sqlx_logging(true);
|
||||
.sqlx_logging(true)
|
||||
.sqlx_logging_level(LevelFilter::Debug);
|
||||
|
||||
if let Some(option_fn) = option_fn {
|
||||
option_fn(&mut opt);
|
||||
|
||||
Reference in New Issue
Block a user