-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RSDK-5526] - Make webcam driver detection debugging better #4794
Conversation
@@ -133,16 +134,22 @@ func selectBestDriver( | |||
|
|||
baseDrivers := driver.GetManager().Query(baseFilter) | |||
logger.Debugw("before specific filter, we found the following drivers", "count", len(baseDrivers)) | |||
for _, d := range baseDrivers { | |||
logger.Debugw(d.Info().Label, "priority", float32(d.Info().Priority), "type", d.Info().DeviceType) | |||
for i, d := range baseDrivers { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more info for base drivers (pre-filter)
logger.Debugw("found no drivers matching filter") | ||
} else { | ||
logger.Debugw("found drivers matching specific filter", "count", len(driverProperties)) | ||
return nil, prop.Media{}, errors.New("found no queryable drivers matching filter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why we don't return immediately before. It makes the error less clear.
@@ -203,14 +216,14 @@ func queryDriverProperties( | |||
if isAvailable { | |||
err := d.Open() | |||
if err != nil { | |||
logger.Debugw("error opening driver for querying", "error", err) | |||
logger.Infow("error trying to open driver for querying", "error", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be info logs since they include valuable information such as IO errors when accessing the driver for query
No description provided.