[VOL-3228] device-id logging consistancy
Change-Id: Idd00d569d5e8724ab9df03ad5a5744b655ba3448
diff --git a/rw_core/route/device_route.go b/rw_core/route/device_route.go
index 48339ec..fe34b65 100644
--- a/rw_core/route/device_route.go
+++ b/rw_core/route/device_route.go
@@ -352,7 +352,7 @@
if len(dr.Routes) == 0 {
logger.Debugw(ctx, "no-routes-found", log.Fields{"logical-device-id": dr.logicalDeviceID})
} else {
- logger.Debugw(ctx, "graph_routes", log.Fields{"lDeviceId": dr.logicalDeviceID, "Routes": output})
+ logger.Debugw(ctx, "graph_routes", log.Fields{"logical-device-id": dr.logicalDeviceID, "Routes": output})
}
}
return nil
@@ -416,7 +416,7 @@
func (dr *DeviceRoutes) getDeviceWithCacheUpdate(ctx context.Context, deviceID string) (map[uint32]*voltha.Port, error) {
devicePorts, err := dr.listDevicePorts(ctx, deviceID)
if err != nil {
- logger.Errorw(ctx, "device-not-found", log.Fields{"deviceId": deviceID, "error": err})
+ logger.Errorw(ctx, "device-not-found", log.Fields{"device-id": deviceID, "error": err})
return nil, err
}
dr.updateCache(deviceID, devicePorts)
@@ -500,7 +500,7 @@
// Get parent device from the model
if _, err := dr.getDeviceWithCacheUpdate(ctx, dr.rootDeviceID); err != nil {
- logger.Errorw(ctx, "device-not-found", log.Fields{"deviceId": dr.rootDeviceID, "error": err})
+ logger.Errorw(ctx, "device-not-found", log.Fields{"device-id": dr.rootDeviceID, "error": err})
return 0, err
}
// Try again