envoy: Replace deprecated FileAccessLog JsonFormat API use
Envoy v3 API deprecated JsonFormat in favor of "log_format"
@@ -171,7 +171,9 @@ func GetAccessLog() []*xds_accesslog_filter.AccessLog {
func getFileAccessLog() *xds_accesslog.FileAccessLog {
accessLogger := &xds_accesslog.FileAccessLog{
Path: accessLogPath,
- AccessLogFormat: &xds_accesslog.FileAccessLog_JsonFormat{
+ AccessLogFormat: &xds_accesslog.FileAccessLog_LogFormat{
+ LogFormat: &xds_core.SubstitutionFormatString{
+ Format: &xds_core.SubstitutionFormatString_JsonFormat{
JsonFormat: &structpb.Struct{
Fields: map[string]*structpb.Value{
"start_time": pbStringValue(`%START_TIME%`),
@@ -196,6 +198,8 @@ func getFileAccessLog() *xds_accesslog.FileAccessLog {
},
},
},
+ },
+ },
}
return accessLogger
}
