Support per package log level
Change-Id: I70de3113567d28d1326ac3eeac42c311d7b33117
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/backend.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/backend.go
index 42574d0..55fda64 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/backend.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/backend.go
@@ -82,7 +82,7 @@
case "consul":
return kvstore.NewConsulClient(address, timeout)
case "etcd":
- return kvstore.NewEtcdClient(address, timeout)
+ return kvstore.NewEtcdClient(address, timeout, log.WarnLevel)
}
return nil, errors.New("unsupported-kv-store")
}
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore/etcdclient.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore/etcdclient.go
index d38f0f6..90158bc 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore/etcdclient.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore/etcdclient.go
@@ -39,12 +39,14 @@
}
// NewEtcdClient returns a new client for the Etcd KV store
-func NewEtcdClient(addr string, timeout int) (*EtcdClient, error) {
+func NewEtcdClient(addr string, timeout int, level log.LogLevel) (*EtcdClient, error) {
duration := GetDuration(timeout)
+ logconfig := log.ConstructZapConfig(log.JSON, level, log.Fields{})
c, err := v3Client.New(v3Client.Config{
Endpoints: []string{addr},
DialTimeout: duration,
+ LogConfig: &logconfig,
})
if err != nil {
logger.Error(err)