Skip to content

Commit

Permalink
Remove original loggeR
Browse files Browse the repository at this point in the history
  • Loading branch information
hexbabe committed Nov 14, 2024
1 parent f9ad184 commit 482e2ad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/camera/videosource/webcam.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 482e2ad

Please sign in to comment.