[VOL-2738]Enable configuration of ectd v3 client options
Change-Id: I75541525b3fd929adf6325f743def45c77e8930a
diff --git a/pkg/db/kvstore/etcdclient.go b/pkg/db/kvstore/etcdclient.go
index d38f0f6..90158bc 100644
--- a/pkg/db/kvstore/etcdclient.go
+++ b/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)