[Helm-Chart] logJSON is not used in server-statefulset.yaml template

In order to integrate consul logs in our plattform logging we require logs in JSON Format.
We use the helm chart from server-statefulset.yaml.
In values.yaml, there is logJSON value but it is not used to add “-log-json” in server-statefulset.yaml to command.

Is there a other way to enable JSON Logging in server statefulset?
Is it possible to add the configuration to helm template?
Like:

...
exec /usr/local/bin/docker-entrypoint.sh consul agent \
...
  {{- if .Values.global.logJSON }}
  -log-json \
  {{- end }}
...
  -server

Hi @Olli73773,

You can configure the Consul client and server agents to log to JSON by adding the log_json option to client.extraConfig and server.extraConfig. For example:

# values.yaml
client:
  extraConfig: |
    {
      "log_json": true
    }
server:
  extraConfig: |
    {
      "log_json": true
    }

Hi @blake,

thanks for the response.
I redployed with the extraConfig and logging is now in JSON.