[VOL-3187]Pass Context down the execution call hierarchy across voltha-go codebase
Change-Id: I6bc2a0f7226c1beed4ae01a15d7b5c4dc04358d8
diff --git a/rw_core/core/api/grpc_nbi_handler.go b/rw_core/core/api/grpc_nbi_handler.go
index 55117d2..45e9645 100755
--- a/rw_core/core/api/grpc_nbi_handler.go
+++ b/rw_core/core/api/grpc_nbi_handler.go
@@ -49,8 +49,8 @@
}
// GetVoltha currently just returns version information
-func (handler *NBIHandler) GetVoltha(context.Context, *empty.Empty) (*voltha.Voltha, error) {
- logger.Debug("GetVoltha")
+func (handler *NBIHandler) GetVoltha(ctx context.Context, _ *empty.Empty) (*voltha.Voltha, error) {
+ logger.Debug(ctx, "GetVoltha")
/*
* For now, encode all the version information into a JSON object and
* pass that back as "version" so the client can get all the
@@ -59,7 +59,7 @@
*/
data, err := json.Marshal(&version.VersionInfo)
if err != nil {
- logger.Warnf("Unable to encode version information as JSON: %s", err.Error())
+ logger.Warnf(ctx, "Unable to encode version information as JSON: %s", err.Error())
return &voltha.Voltha{Version: version.VersionInfo.Version}, nil
}
return &voltha.Voltha{Version: string(data)}, nil