zalando / spilo

Highly available elephant herd: HA PostgreSQL cluster using Docker
Apache License 2.0
1.51k stars 371 forks source link

json log option #972

Closed morgoved closed 4 months ago

morgoved commented 4 months ago

Hello i use this configuration

        - name: SPILO_CONFIGURATION
          value: | ## https://github.com/zalando/patroni#yaml-configuration
            postgresql:
              parameters:
                log_destination: jsonlog
                logging_collector: on
            bootstrap:
              postgresql:
                parameters:
                  log_destination: jsonlog
                  logging_collector: off
              initdb:
                - auth-host: md5
                - auth-local: trust

but i see into output

2024-02-18 11:03:24.463 UTC [2857] LOG:  invalid value for parameter "log_destination": "jsonlog"
2024-02-18 11:03:24.463 UTC [2857] DETAIL:  Unrecognized key word: "jsonlog".

i use 15 postgres version - it's should works but i don't why it's not working

hughcapet commented 4 months ago

this is Postgres logs, not Spilo or Patroni. Seems, it is not PG15...

another important thing from the PG docs:

logging_collector must be enabled to generate JSON-format log output.

morgoved commented 4 months ago

i builded image with postgres 15 version i tryed play with on off and it's not help

hughcapet commented 4 months ago

please execute select version()

morgoved commented 4 months ago

hm fixed run upgrade cluster but... i cant see into stdout json logs just in folder)

hughcapet commented 4 months ago

Sorry, I can not debug it for you. You need to properly configure it based on the PG docs