From 482e2ad35269e5d9f8e36a477b4aa389aceb2e06 Mon Sep 17 00:00:00 2001 From: hexbabe Date: Thu, 14 Nov 2024 14:18:13 -0500 Subject: [PATCH] Remove original loggeR --- components/camera/videosource/webcam.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/camera/videosource/webcam.go b/components/camera/videosource/webcam.go index fe24dbfe847..de8175775c0 100644 --- a/components/camera/videosource/webcam.go +++ b/components/camera/videosource/webcam.go @@ -331,7 +331,6 @@ type webcam struct { disconnected bool activeBackgroundWorkers sync.WaitGroup logger logging.Logger - originalLogger logging.Logger } // NewWebcam returns the webcam discovered based on the given config as the Camera interface type. @@ -346,7 +345,6 @@ func NewWebcam( cam := &webcam{ Named: conf.ResourceName().AsNamed(), logger: logger.WithFields("camera_name", conf.ResourceName().ShortName()), - originalLogger: logger, cancelCtx: cancelCtx, cancel: cancel, } @@ -475,7 +473,7 @@ func (c *webcam) reconnectCamera(conf *WebcamConfig) error { c.targetPath = foundLabel } - c.logger = c.originalLogger.WithFields("camera_label", c.targetPath) + c.logger = c.logger.WithFields("camera_label", c.targetPath) return nil }