1
0
Fork 0
mirror of https://git.42l.fr/neil/sncf.git synced 2024-05-02 22:13:10 +02:00

do not disclose database path in stdout unless debug_mode is enabled

This commit is contained in:
neil 2020-11-01 18:02:26 +01:00
parent cab8136e1e
commit 50f3ed4e90

View file

@ -62,7 +62,14 @@ async fn main() -> std::io::Result<()> {
if CONFIG.database_path.len() == 0 {
println!("No database specified. Please enter a MySQL, PostgreSQL or SQLite connection string in config.toml.");
}
println!("Opening database {}", CONFIG.database_path);
if CONFIG.debug_mode {
println!("Opening database {}", CONFIG.database_path);
}
else {
println!("Opening database...");
}
let manager = ConnectionManager::<DbConn>::new(&CONFIG.database_path);
let pool = r2d2::Pool::builder()
.build(manager)