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:
parent
cab8136e1e
commit
50f3ed4e90
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue