mirror of
https://git.42l.fr/neil/sncf.git
synced 2024-06-08 02:32:14 +02:00
do not disclose database path in stdout unless debug_mode is enabled
This commit is contained in:
parent
cab8136e1e
commit
50f3ed4e90
|
@ -62,7 +62,14 @@ async fn main() -> std::io::Result<()> {
|
||||||
if CONFIG.database_path.len() == 0 {
|
if CONFIG.database_path.len() == 0 {
|
||||||
println!("No database specified. Please enter a MySQL, PostgreSQL or SQLite connection string in config.toml.");
|
println!("No database specified. Please enter a MySQL, PostgreSQL or SQLite connection string in config.toml.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if CONFIG.debug_mode {
|
||||||
println!("Opening database {}", CONFIG.database_path);
|
println!("Opening database {}", CONFIG.database_path);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
println!("Opening database...");
|
||||||
|
}
|
||||||
|
|
||||||
let manager = ConnectionManager::<DbConn>::new(&CONFIG.database_path);
|
let manager = ConnectionManager::<DbConn>::new(&CONFIG.database_path);
|
||||||
let pool = r2d2::Pool::builder()
|
let pool = r2d2::Pool::builder()
|
||||||
.build(manager)
|
.build(manager)
|
||||||
|
|
Loading…
Reference in a new issue