Skip to content

Commit

Permalink
setup logger
Browse files Browse the repository at this point in the history
Signed-off-by: disksing <[email protected]>
  • Loading branch information
disksing committed Jan 24, 2025
1 parent acaebb1 commit b7d7c52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tikv/etcd_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/tikv/client-go/v2/config"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/client/v3/namespace"
zap "go.uber.org/zap"
)

var etcdMutex sync.Mutex
Expand All @@ -46,8 +47,10 @@ func getSharedEtcdClient(addrs []string) (*clientv3.Client, error) {
if err != nil {
return nil, err
}
etcdLogCfg := zap.NewProductionConfig()
cli, err := clientv3.New(
clientv3.Config{
LogConfig: &etcdLogCfg,
Endpoints: addrs,
AutoSyncInterval: 30 * time.Second,
DialTimeout: 5 * time.Second,
Expand Down

0 comments on commit b7d7c52

Please sign in to comment.