[VOL-3069]Pass Context in methods which are performing logging and need the context
Change-Id: Ie84f9e240aa4f47d0046acaac0d82d21b17252e5
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/utils.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/utils.go
index 94e8bd6..3d91119 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/utils.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/adapters/common/utils.go
@@ -16,6 +16,7 @@
package common
import (
+ "context"
"fmt"
"github.com/opencord/voltha-lib-go/v3/pkg/log"
ic "github.com/opencord/voltha-protos/v3/go/inter_container"
@@ -75,7 +76,7 @@
return string(b)
}
-func ICProxyErrorCodeToGrpcErrorCode(icErr ic.ErrorCodeCodes) codes.Code {
+func ICProxyErrorCodeToGrpcErrorCode(ctx context.Context, icErr ic.ErrorCodeCodes) codes.Code {
switch icErr {
case ic.ErrorCode_INVALID_PARAMETERS:
return codes.InvalidArgument
@@ -84,7 +85,7 @@
case ic.ErrorCode_DEADLINE_EXCEEDED:
return codes.DeadlineExceeded
default:
- logger.Warnw("cannnot-map-ic-error-code-to-grpc-error-code", log.Fields{"err": icErr})
+ logger.Warnw(ctx, "cannnot-map-ic-error-code-to-grpc-error-code", log.Fields{"err": icErr})
return codes.Internal
}
}