some logging

This commit is contained in:
Simon
2025-07-15 18:52:10 +00:00
parent bed8882329
commit f81a0e2ec5
2 changed files with 10 additions and 1 deletions

View File

@@ -22,9 +22,14 @@ type DbPool = r2d2::Pool<ConnectionManager<SqliteConnection>>;
#[ntex::main]
async fn main() -> std::io::Result<()> {
// std::env::set_var("RUST_BACKTRACE", "1");
env_logger::init(); // You need this to actually see logs
dotenv().ok();
// Enable request logging
unsafe {
std::env::set_var("RUST_LOG", "info");
}
env_logger::init(); // You need this to actually see logs
// set up database connection pool
let connspec = std::env::var("DATABASE_URL").expect("DATABASE_URL");
let manager = ConnectionManager::<SqliteConnection>::new(connspec);