log postgres config

This commit is contained in:
GroovieGermanikus 2024-06-26 10:40:17 +02:00
parent 5c640c94fa
commit 0fdf9fb1b6
No known key found for this signature in database
GPG Key ID: 5B6EB831A5CD2015
1 changed files with 2 additions and 0 deletions

View File

@ -108,6 +108,8 @@ impl PostgresSession {
pub async fn new(nb: usize) -> anyhow::Result<Self> {
let pg_config = std::env::var("PG_CONFIG").context("env PG_CONFIG not found")?;
let pg_config = pg_config.parse::<tokio_postgres::Config>()?;
info!("Using Postgres config to database {} with ssl_disabled={}",
pg_config.get_dbname().unwrap_or("n/a"), matches!(pg_config.get_ssl_mode(), SslMode::Disable));
let client = if let SslMode::Disable = pg_config.get_ssl_mode() {
Self::spawn_connection(pg_config, NoTls).await?