Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhbh committed Jan 14, 2025
1 parent f355e28 commit 97c0a2c
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions projects/gloo/pkg/translator/translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,6 @@ func (t *translatorInstance) Translate(
p.Init(plugins.InitParams{Ctx: params.Ctx, Settings: t.settings})
}

for _, l := range proxy.GetListeners() {
contextutils.LoggerFrom(context.Background()).Infof("listener: %v", l.GetName())
if l.GetHttpListener() != nil {
for _, vh := range l.GetHttpListener().GetVirtualHosts() {
contextutils.LoggerFrom(context.Background()).Infof("virtual host: %v", vh.GetName())
for _, route := range vh.GetRoutes() {
contextutils.LoggerFrom(context.Background()).Infof("route early staged transformation: %v", route.GetOptions().GetStagedTransformations().GetEarly())
}
}

}
}

// prepare reports used to aggregate Warnings/Errors encountered during translation
reports := make(reporter.ResourceReports)
proxyReport := validation.MakeReport(proxy)
Expand Down Expand Up @@ -288,6 +275,18 @@ func (t *translatorInstance) translateListenerSubsystemComponents(params plugins
// This way we call ProcessVirtualHost / ProcessRoute first
envoyRouteConfiguration := routeConfigurationTranslator.ComputeRouteConfiguration(params)

for _, l := range proxy.GetListeners() {
contextutils.LoggerFrom(context.Background()).Infof("listener: %v", l.GetName())
if l.GetHttpListener() != nil {
for _, vh := range l.GetHttpListener().GetVirtualHosts() {
contextutils.LoggerFrom(context.Background()).Infof("virtual host: %v", vh.GetName())
for _, route := range vh.GetRoutes() {
contextutils.LoggerFrom(context.Background()).Infof("route early staged transformation: %v", route.GetOptions().GetStagedTransformations().GetEarly())
}
}
}
}

// 2. Compute Listener
// This way we evaluate HttpFilters second, which allows us to avoid appending an HttpFilter
// that is not used by any Route / VirtualHost
Expand Down

0 comments on commit 97c0a2c

Please sign in to comment.