some logging
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user