istio日志输出时区可以修改吗?
Can the istio log output time zone be modified?
[2020-11-27T03:53:09.046Z] "HEAD /productpage HTTP/1.1" 200 - "-" 0 0 27 27 "10.244.11.0" "curl/7.47.0" "ef48c206-422a-9d0d-ac56-9be531b190f7" "10.22.24.5:31695" "10.244.6.18:9080" outbound|9080||productpage.istio-web.svc.cluster.local 10.244.6.251:41376 10.244.6.251:8080 10.244.11.0:54697 - -
如何将 istio 日志时区更改为 'Asia/Shanghai'?
这个话题已经在 envoy github 上讨论过,因为 istio 使用 envoy access log。
据我所知目前这是不可能的。我在上面提到的 github 个问题表明它默认是在 UTC 中设计的。
- Access log's timestamps are still in UTC regardless a containter's timezone
- How to change the log time zone of each component of Istio to CST format
甚至不可能说服图像使用您的时区,因为 envoy 无论如何都会使用 UTC。
[2020-11-27T03:53:09.046Z] "HEAD /productpage HTTP/1.1" 200 - "-" 0 0 27 27 "10.244.11.0" "curl/7.47.0" "ef48c206-422a-9d0d-ac56-9be531b190f7" "10.22.24.5:31695" "10.244.6.18:9080" outbound|9080||productpage.istio-web.svc.cluster.local 10.244.6.251:41376 10.244.6.251:8080 10.244.11.0:54697 - -
如何将 istio 日志时区更改为 'Asia/Shanghai'?
这个话题已经在 envoy github 上讨论过,因为 istio 使用 envoy access log。
据我所知目前这是不可能的。我在上面提到的 github 个问题表明它默认是在 UTC 中设计的。
- Access log's timestamps are still in UTC regardless a containter's timezone
- How to change the log time zone of each component of Istio to CST format
甚至不可能说服图像使用您的时区,因为 envoy 无论如何都会使用 UTC。