Skip to content

Commit 65b45ff

Browse files
authored
Merge pull request #3066 from 08volt/logging-logs
feat(logging): add detailed logging for L4 backend service
2 parents 3d7cc81 + 8dc1e04 commit 65b45ff

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

pkg/l4/backends/backends.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ func (p *Pool) EnsureL4BackendService(params L4BackendServiceParams, beLogger kl
288288
}
289289

290290
if params.LogConfigControlEnabled {
291+
beLogger.V(2).Info("EnsureL4BackendService: using provided LogConfig for backend service", "logConfig", params.LogConfig)
291292
expectedBS.LogConfig = params.LogConfig
292293
} else if currentBS != nil {
293294
expectedBS.LogConfig = currentBS.LogConfig

pkg/l4/resources/l4.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ func (l4 *L4) EnsureInternalLoadBalancer(nodeNames []string, svc *corev1.Service
557557
l4.svcLogger.Error(err, "Failed to determine L4 logging config")
558558
l4.recorder.Eventf(l4.Service, corev1.EventTypeWarning, l4lbconfig.GetReasonForError(err), "Failed to apply L4LBConfig: %v", err)
559559
}
560+
l4.svcLogger.V(2).Info("Determined L4 logging config", "logConfig", logConfig, "loggingCondition", loggingCondition)
560561
logConfigControlEnabled := loggingCondition.Status == metav1.ConditionTrue
561562
result.MetricsState.LoggingControlEnabled = logConfigControlEnabled
562563

pkg/l4/resources/l4netlb.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ func (l4netlb *L4NetLB) provideBackendService(syncResult *L4NetLBSyncResult, hcL
412412
l4netlb.svcLogger.Error(err, "Failed to determine L4 logging config")
413413
l4netlb.recorder.Eventf(l4netlb.Service, corev1.EventTypeWarning, l4lbconfig.GetReasonForError(err), "L4LBConfig could not be retrieved: %v", err)
414414
}
415+
l4netlb.svcLogger.V(2).Info("Determined L4 logging config", "logConfig", logConfig, "loggingCondition", loggingCondition)
415416
logConfigControlEnabled := loggingCondition.Status == metav1.ConditionTrue
416417
syncResult.MetricsState.LoggingControlEnabled = logConfigControlEnabled
417418

0 commit comments

Comments
 (0)