bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.03k stars 4.38k forks source link

[bitnami/pgbouncer] Option to disable writing logs to a file #68508

Open taraspos opened 2 days ago

taraspos commented 2 days ago

Name and Version

bitnami/pgbouncer:1.22.1

What is the problem this feature will solve?

Current configuration forces pgbouncer logs to be written to the file, in addition to the stderr logging[^1].

https://github.com/bitnami/containers/blob/6c7d4f746072925abe987a3a3a6ad8962c89184b/bitnami/pgbouncer/1/debian-12/rootfs/opt/bitnami/scripts/pgbouncer-env.sh#L119-L120

This result in unnecessary pgbouncer.log which is taking a lot of the space on the local filesystem.

[^1]: > logfile

Specifies the log file. For daemonization (-d), either this or syslog need to be set.

The log file is kept open, so after rotation, kill -HUP or on console RELOAD; should be done. On Windows, the service must be stopped and started.

Note that setting logfile does not by itself turn off logging to stderr. Use the command-line option -q or -d for that.

Default: not set

https://www.pgbouncer.org/config.html

What is the feature you are proposing to solve the problem?

Introduce conditional check to add logfile entry to the ini file when

PGBOUNCER_LOG_FILE=disabled

What alternatives have you considered?

No response

carrodher commented 2 days ago

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.