Change database log level to debug

This commit is contained in:
GW_MC
2025-11-25 21:17:03 +08:00
parent f9218e0927
commit 56c1161e97
4 changed files with 16 additions and 3 deletions

View File

@@ -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);