Skip to content

Commit 44498c7

Browse files
committed
remove export log function
1 parent 3db8339 commit 44498c7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

internal/controller/state/graph/backend_tls_policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func addGatewaysForBackendTLSPolicies(
316316
"Gateway not found in the graph", "policy", policyName, "ancestor", gatewayName)
317317
}
318318

319-
LogAncestorLimitReached(logger, policyName, "BackendTLSPolicy", gatewayName)
319+
logAncestorLimitReached(logger, policyName, "BackendTLSPolicy", gatewayName)
320320
continue
321321
}
322322

internal/controller/state/graph/backend_tls_policy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ func TestAddGatewaysForBackendTLSPoliciesAncestorLimit(t *testing.T) {
800800
g.Expect(gateway2.Conditions).To(BeEmpty(), "Normal gateway should not have conditions")
801801

802802
// Verify logging function works - test the logging function directly
803-
LogAncestorLimitReached(testLogger, "test/btp-full-ancestors", "BackendTLSPolicy", "test/gateway1")
803+
logAncestorLimitReached(testLogger, "test/btp-full-ancestors", "BackendTLSPolicy", "test/gateway1")
804804
logOutput := logBuf.String()
805805

806806
g.Expect(logOutput).To(ContainSubstring("Policy ancestor limit reached"))

internal/controller/state/graph/policies.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func attachPolicyToService(
200200
policyKind := getPolicyKind(policy.Source)
201201

202202
gw.Conditions = addPolicyAncestorLimitCondition(gw.Conditions, policyName, policyKind)
203-
LogAncestorLimitReached(logger, policyName, policyKind, gwNsName.String())
203+
logAncestorLimitReached(logger, policyName, policyKind, gwNsName.String())
204204

205205
// Mark this gateway as invalid for the policy due to ancestor limits
206206
policy.InvalidForGateways[gwNsName] = struct{}{}
@@ -248,7 +248,7 @@ func attachPolicyToRoute(
248248
routeName := getAncestorName(ancestorRef)
249249

250250
route.Conditions = addPolicyAncestorLimitCondition(route.Conditions, policyName, policyKind)
251-
LogAncestorLimitReached(logger, policyName, policyKind, routeName)
251+
logAncestorLimitReached(logger, policyName, policyKind, routeName)
252252

253253
return
254254
}
@@ -326,7 +326,7 @@ func attachPolicyToGateway(
326326
// Log in the controller log.
327327
logger.Info("Gateway target not found and ancestors slice is full.", "policy", policyName, "ancestor", ancestorName)
328328
}
329-
LogAncestorLimitReached(logger, policyName, policyKind, ancestorName)
329+
logAncestorLimitReached(logger, policyName, policyKind, ancestorName)
330330

331331
policy.InvalidForGateways[ref.Nsname] = struct{}{}
332332
return

internal/controller/state/graph/policy_ancestor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313

1414
const maxAncestors = 16
1515

16-
// LogAncestorLimitReached logs when a policy ancestor limit is reached.
17-
func LogAncestorLimitReached(logger logr.Logger, policyName, policyKind, ancestorName string) {
16+
// logAncestorLimitReached logs when a policy ancestor limit is reached.
17+
func logAncestorLimitReached(logger logr.Logger, policyName, policyKind, ancestorName string) {
1818
logger.Info("Policy ancestor limit reached", "policy", policyName, "policyKind", policyKind, "ancestor", ancestorName)
1919
}
2020

0 commit comments

Comments
 (0)