Skip to content

Commit d687ae6

Browse files
committed
remove logger from collector
Signed-off-by: Etai Lev Ran <[email protected]>
1 parent 7418925 commit d687ae6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/epp/datalayer/collector.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"sync"
2323
"time"
2424

25-
"github.com/go-logr/logr"
2625
"sigs.k8s.io/controller-runtime/pkg/log"
2726

2827
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/util/logging"
@@ -74,8 +73,6 @@ type Collector struct {
7473
startOnce sync.Once
7574
stopOnce sync.Once
7675

77-
logger logr.Logger
78-
7976
// TODO: optional metrics tracking collection (e.g., errors, invocations, ...)
8077
}
8178

@@ -91,13 +88,12 @@ func (c *Collector) Start(ctx context.Context, ticker Ticker, ep Endpoint, sourc
9188
started := false
9289

9390
c.startOnce.Do(func() {
94-
c.logger = log.FromContext(ctx)
91+
logger := log.FromContext(ctx).WithValues("endpoint", ep.GetPod().GetIPAddress())
9592
c.ctx, c.cancel = context.WithCancel(ctx)
9693
started = true
9794
ready = make(chan struct{})
9895

9996
go func(endpoint Endpoint, sources []DataSource) {
100-
logger := log.FromContext(ctx).WithValues("endpoint", ep.GetPod().GetIPAddress())
10197
logger.V(logging.DEFAULT).Info("starting collection")
10298

10399
defer func() {

0 commit comments

Comments
 (0)