Skip to content

Commit

Permalink
[bitnami/postgresql-repmgr] redirect csvlog and jsonlog to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
yukha-dw committed Dec 26, 2024
1 parent c95ab9a commit 3bb5e53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ export POSTGRESQL_PGHBA_FILE="$POSTGRESQL_CONF_DIR/pg_hba.conf"
export POSTGRESQL_RECOVERY_FILE="$POSTGRESQL_DATA_DIR/recovery.conf"
export POSTGRESQL_LOG_DIR="$POSTGRESQL_BASE_DIR/logs"
export POSTGRESQL_LOG_FILE="$POSTGRESQL_LOG_DIR/postgresql.log"
export POSTGRESQL_LOG_CSV_FILE="$POSTGRESQL_LOG_DIR/postgresql.csv"
export POSTGRESQL_LOG_JSON_FILE="$POSTGRESQL_LOG_DIR/postgresql.json"
export POSTGRESQL_TMP_DIR="$POSTGRESQL_BASE_DIR/tmp"
export POSTGRESQL_PID_FILE="$POSTGRESQL_TMP_DIR/postgresql.pid"
export POSTGRESQL_BIN_DIR="$POSTGRESQL_BASE_DIR/bin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ chmod +x "$REPMGR_EVENTS_DIR"/router.sh "$REPMGR_EVENTS_DIR"/execs/*sh "$REPMGR_

# Redirect all logging to stdout
ln -sf /dev/stdout "$POSTGRESQL_LOG_FILE"
ln -sf /dev/stdout "$POSTGRESQL_LOG_CSV_FILE"
ln -sf /dev/stdout "$POSTGRESQL_LOG_JSON_FILE"

# Copy all initially generated configuration files to the default directory
# (this is to avoid breaking when entrypoint is being overridden)
cp -r "${POSTGRESQL_CONF_DIR}/"* "$POSTGRESQL_DEFAULT_CONF_DIR"

0 comments on commit 3bb5e53

Please sign in to comment.