forked from Ruderverein-Donau-Linz/rowt
demote sqlx log to debug
This commit is contained in:
parent
659d2091e5
commit
2d1710251c
11
src/main.rs
11
src/main.rs
@ -1,5 +1,7 @@
|
|||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
use rot::rest;
|
use rot::rest;
|
||||||
use sqlx::SqlitePool;
|
use sqlx::{pool::PoolOptions, sqlite::SqliteConnectOptions, ConnectOptions};
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
@ -9,7 +11,12 @@ async fn rocket() -> _ {
|
|||||||
env_logger::init();
|
env_logger::init();
|
||||||
|
|
||||||
//let pool = SqlitePool::connect(":memory:").await.unwrap();
|
//let pool = SqlitePool::connect(":memory:").await.unwrap();
|
||||||
let pool = SqlitePool::connect("db.sqlite").await.unwrap(); //TODO: fixme
|
let mut connection_options = SqliteConnectOptions::from_str("sqlite://db.sqlite").unwrap();
|
||||||
|
connection_options.log_statements(log::LevelFilter::Debug);
|
||||||
|
let pool = PoolOptions::new()
|
||||||
|
.connect_with(connection_options)
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
rest::start(pool)
|
rest::start(pool)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user