Skip to content
Permalink
Browse files

gate the access log on the version instead of marshaling (#12516)

  • Loading branch information...
dwradcliffe authored and duderino committed Mar 16, 2019
1 parent 944a075 commit 82797c0c0649a3f73029b33957ae105260458c6e
@@ -1426,8 +1426,11 @@ func buildHTTPConnectionManager(node *model.Proxy, env *model.Environment, httpO
Name: xdsutil.FileAccessLog,
}

if util.IsXDSMarshalingToAnyEnabled(node) {
if util.IsProxyVersionGE11(node) {
buildAccessLog(fl, env)
}

if util.IsXDSMarshalingToAnyEnabled(node) {
acc.ConfigType = &accesslog.AccessLog_TypedConfig{TypedConfig: util.MessageToAny(fl)}
} else {
acc.ConfigType = &accesslog.AccessLog_Config{Config: util.MessageToStruct(fl)}
@@ -54,8 +54,10 @@ func setAccessLogAndBuildTCPFilter(env *model.Environment, node *model.Proxy, co
acc := &accesslog.AccessLog{
Name: xdsutil.FileAccessLog,
}
if util.IsXDSMarshalingToAnyEnabled(node) {
if util.IsProxyVersionGE11(node) {
buildAccessLog(fl, env)
}
if util.IsXDSMarshalingToAnyEnabled(node) {
acc.ConfigType = &accesslog.AccessLog_TypedConfig{TypedConfig: util.MessageToAny(fl)}
} else {
acc.ConfigType = &accesslog.AccessLog_Config{Config: util.MessageToStruct(fl)}

0 comments on commit 82797c0

Please sign in to comment.
You can’t perform that action at this time.