From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: alisalemmi@outlook.com
Subject: BUG #18243: Ability to log in json format to stdout
Date: Tue, 12 Dec 2023 18:57:17 +0000
Message-ID: <18243-b4b6647beca4c46b@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18243
Logged by: ali salemi
Email address: alisalemmi@outlook.com
PostgreSQL version: 16.1
Operating system: Debian 12 (postgres:16.1 image)
Description:
I am currently setting up PostgreSQL within a Kubernetes environment and
have encountered a logging challenge. PostgreSQL offers two logging
options:
1. Logging to stderr.
2. Logging in JSON format to a file.
However, I require PostgreSQL to log in JSON format directly to stdout, as
this aligns with Kubernetes’ best practices for logging. Logging to a file
introduces additional complexities, such as log rotation and deletion, which
are typically handled by logrotate. Unfortunately, the container images I am
using do not include logrotate.
I am considering a solution that allows logging in either stdout or a file,
regardless of the format, to circumvent these issues. I am seeking guidance
or suggestions on how to implement this effectively within Kubernetes,
ensuring that log management adheres to best practices and does not
compromise the integrity and performance of the PostgreSQL service.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, alisalemmi@outlook.com
Subject: Re: BUG #18243: Ability to log in json format to stdout
In-Reply-To: <18243-b4b6647beca4c46b@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox