Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log to stdout/stderr #353

Closed
fridex opened this issue Nov 29, 2019 · 2 comments
Closed

Log to stdout/stderr #353

fridex opened this issue Nov 29, 2019 · 2 comments

Comments

@fridex
Copy link

fridex commented Nov 29, 2019

We run postgres deployment from OpenShift service catalog on RH PSI. The postgres container logs to files which makes it harder/not straightforward to check what's going on in the OpenShift (its expected all services report logs to stdout/stderr). Would it be possible to adjust the configuration option of PG so that it logs to stdout/stderr?

hhorak added a commit to hhorak/postgresql-container that referenced this issue Mar 23, 2020
For easier debugging, it should be pretty easy to switch daemon to log into the /dev/stderr.
This adds such a feature by setting POSTGRESQL_LOG_DESTINATION environment variable to /dev/stderr.
Requested at sclorg#353
@hhorak
Copy link
Member

hhorak commented Mar 23, 2020

Few thoughts:

I've checked that mysql container logs to stderr by default.

There is already a generic way how to change any config parameter (and an example shows exactly changing the log destination: https://github.com/sclorg/postgresql-container/blob/master/examples/extending-image/postgresql-cfg/s2i-extending.conf).

While we cannot probably change the default behaviour of PostgreSQL, it makes sense to me to allow to do that easily, probably more easier than bind-mounting a config file or building a new layer as shown in extending-image/postgresql-cfg.

So, this PR is an attempt to make it more straightforward, but setting -e POSTGRESQL_LOG_DESTINATION=/dev/stderr.

@UncleAlbie @pkubatrh @phracek What do you think?

pkubatrh pushed a commit to hhorak/postgresql-container that referenced this issue Jun 17, 2020
For easier debugging, it should be pretty easy to switch daemon to log into the /dev/stderr.
This adds such a feature by setting POSTGRESQL_LOG_DESTINATION environment variable to /dev/stderr.
Requested at sclorg#353
hhorak added a commit to hhorak/postgresql-container that referenced this issue Mar 1, 2023
For easier debugging, it should be pretty easy to switch daemon to log into the /dev/stderr.
This adds such a feature by setting POSTGRESQL_LOG_DESTINATION environment variable to /dev/stderr.
Requested at sclorg#353
@fila43
Copy link
Member

fila43 commented Mar 30, 2023

The mentioned feature(POSTGRESQL_LOG_DESTINATION=/dev/stderr) was already added by #366.

@fila43 fila43 closed this as completed Mar 30, 2023
phracek pushed a commit to mscherer/postgresql-container that referenced this issue Oct 3, 2023
For easier debugging, it should be pretty easy to switch daemon to log into the /dev/stderr.
This adds such a feature by setting POSTGRESQL_LOG_DESTINATION environment variable to /dev/stderr.
Requested at sclorg#353
phracek pushed a commit to mscherer/postgresql-container that referenced this issue Oct 3, 2023
For easier debugging, it should be pretty easy to switch daemon to log into the /dev/stderr.
This adds such a feature by setting POSTGRESQL_LOG_DESTINATION environment variable to /dev/stderr.
Requested at sclorg#353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants