Skip to content

log into postgres log when json enabled #618

New issue

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

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

Already on GitHub? # to your account

Open
shab2 opened this issue Jan 26, 2024 · 2 comments
Open

log into postgres log when json enabled #618

shab2 opened this issue Jan 26, 2024 · 2 comments

Comments

@shab2
Copy link

shab2 commented Jan 26, 2024

Hi!
/opt/pgpro/std-15/bin/pg_probackup archive-push -B /var/lib/postgresql/15/backup --instance NBS_DBA --wal-file-path=%p --wal-file-name=%f --overwrite --log-format-console=json --log-format-file=json'
puts log into <postgres_name_log>.log
but postgesql logging into log with extention json
How to put archive-push command log into json postgres log?
Thanks

@demonolock
Copy link

Hi, archive-push doesn't support logging in json format.
With parameters
logging_collector = 'on'
log_destination = 'jsonlog'
it creates 2 files .json with Postgresql logs and .log. Archive-push command will continue write to file .log.
Is it ok for you, or you need them in json format too? If yes, could you, please, describe the reason.

@lightyrs
Copy link

lightyrs commented Apr 5, 2025

For the sake of standardized log formatting, if I have my postgresql.conf configured for jsonlog, I would like my archive-push logs to be formatted json and appear in the postgresql log files.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants