I’m trying to output my istio-proxy logs to JSON
format. Below is my yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
revision: "1-6-14"
hub: "254549224557.dkr.ecr.us-west-2.amazonaws.com/istio"
meshConfig:
enablePrometheusMerge: false
accessLogEncoding: JSON
accessLogFile: "/dev/stdout"
accessLogFormat: |
{
"accessLogFormat": "{\"a\": \"access_log\",\"start_time\": \"%START_TIME%\"}"
}
values:
# Enable access logs
global:
proxy:
accessLogFormat: |
{
"accessLogFormat": "{\"a\": \"access_log\",\"start_time\": \"%START_TIME%\"}"
}
I rolled out istiod
and my test service
When I do kubectl logs -f foobar -n test -c istio-proxy
i expect a log format of
{"start_time":"2020-09-08T07:16:08.326Z","a":"access_log"}
But nothing happens, logs are same as usual. Its not json and it’s not in the format i want.
2021-09-20T07:13:30.355060Z info Channel Connectivity change to CONNECTING
2021-09-20T07:13:30.364513Z info Subchannel Connectivity change to READY