diff --git a/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/libpgbouncer.sh b/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/libpgbouncer.sh index 3abc1b7234d48..c5a885f12ad97 100644 --- a/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/libpgbouncer.sh +++ b/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/libpgbouncer.sh @@ -187,6 +187,10 @@ pgbouncer_escape_auth() { pgbouncer_initialize() { info "Initializing PgBouncer..." + if [[ "$PGBOUNCER_LOG_FILE" == "disable" ]]; then + PGBOUNCER_LOG_FILE="" + fi + # Clean logs, pids and configuration files from previous restarts rm -f "$PGBOUNCER_PID_FILE" "$PGBOUNCER_LOG_FILE" "$PGBOUNCER_AUTH_FILE" "$PGBOUNCER_CONF_FILE" diff --git a/bitnami/pgbouncer/README.md b/bitnami/pgbouncer/README.md index 5b7ce28f288d5..309f9aab7b65e 100644 --- a/bitnami/pgbouncer/README.md +++ b/bitnami/pgbouncer/README.md @@ -68,7 +68,7 @@ docker build -t bitnami/APP:latest . | Name | Description | Default Value | |---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------| -| `PGBOUNCER_LOG_FILE` | PgBouncer log file. | `${PGBOUNCER_LOG_DIR}/pgbouncer.log` | +| `PGBOUNCER_LOG_FILE` | PgBouncer logfile. By default logs are written to stdout **and** the `PGBOUNCER_LOG_FILE`. In order to disable logging to the file set `PGBOUNCER_LOG_FILE=disable` | `${PGBOUNCER_LOG_DIR}/pgbouncer.log` | | `PGBOUNCER_DATABASE` | PgBouncer advertised database. | `postgres` | | `PGBOUNCER_PORT` | PgBouncer port | `6432` | | `PGBOUNCER_LISTEN_ADDRESS` | PgBouncer listen address | `0.0.0.0` |