Skip to content

Commit

Permalink
chore(kongstate) update logging var
Browse files Browse the repository at this point in the history
Convert some logs to use the logging package. These lines were moved
elsewhere in a feature commit in main, so they weren't updated by
6dd9031 in the 3.2.x branch.
  • Loading branch information
rainest committed Jul 24, 2024
1 parent c0f4ff1 commit aa84635
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/dataplane/kongstate/kongstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ func (ks *KongState) fillCustomEntityForeignFields(
if !ok {
return
}
logger.V(util.DebugLevel).Info("fetch references via plugin", "plugin_key", pluginKey)
logger.V(logging.DebugLevel).Info("fetch references via plugin", "plugin_key", pluginKey)

// Traverse through the fields of the entity and fill the "foreign" fields with IDs of referring entities.
// Note: this procedure will make referred services'/routes'/consumers' ID to be filled.
Expand All @@ -841,7 +841,7 @@ func (ks *KongState) fillCustomEntityForeignFields(
parsedEntity[fieldName] = map[string]interface{}{
"id": serviceIDs[0],
}
logger.V(util.DebugLevel).Info("added ref to service", "service_id", serviceIDs[0])
logger.V(logging.DebugLevel).Info("added ref to service", "service_id", serviceIDs[0])
}
case string(kong.EntityTypeRoutes):
routeIDs := lo.FilterMap(rels.Routes, func(r *Route, _ int) (string, bool) {
Expand All @@ -854,7 +854,7 @@ func (ks *KongState) fillCustomEntityForeignFields(
parsedEntity[fieldName] = map[string]interface{}{
"id": routeIDs[0],
}
logger.V(util.DebugLevel).Info("added ref to route", "route_id", routeIDs[0])
logger.V(logging.DebugLevel).Info("added ref to route", "route_id", routeIDs[0])
}
case string(kong.EntityTypeConsumers):
consumerIDs := lo.FilterMap(rels.Consumers, func(c *Consumer, _ int) (string, bool) {
Expand All @@ -867,7 +867,7 @@ func (ks *KongState) fillCustomEntityForeignFields(
parsedEntity[fieldName] = map[string]interface{}{
"id": consumerIDs[0],
}
logger.V(util.DebugLevel).Info("added ref to consumer", "consumer_id", consumerIDs[0])
logger.V(logging.DebugLevel).Info("added ref to consumer", "consumer_id", consumerIDs[0])
}
}
}
Expand Down

0 comments on commit aa84635

Please sign in to comment.