Skip to content

Commit

Permalink
refactor: remove zk logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed Apr 22, 2024
1 parent b6391ac commit 88f78d9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pkg/common/discoveryregister/discoveryregister.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
"github.com/openimsdk/tools/discovery"
"github.com/openimsdk/tools/discovery/zookeeper"
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/tools/log"
"os"
"time"
)

Expand All @@ -35,18 +33,13 @@ const (
func NewDiscoveryRegister(zookeeperConfig *config.ZooKeeper, share *config.Share) (discovery.SvcDiscoveryRegistry, error) {
switch share.Env {
case zookeeperConst:
zklogger, err := log.NewConsoleZapLogger("", 6, false, config.Version, os.Stdout)
if err != nil {
return nil, errs.Wrap(err)
}
return zookeeper.NewZkClient(
zookeeperConfig.Address,
zookeeperConfig.Schema,
zookeeper.WithFreq(time.Hour),
zookeeper.WithUserNameAndPassword(zookeeperConfig.Username, zookeeperConfig.Password),
zookeeper.WithRoundRobin(),
zookeeper.WithTimeout(10),
zookeeper.WithLogger(zklogger),
)
case kubenetesConst:
return kubernetes.NewK8sDiscoveryRegister(share.RpcRegisterName.MessageGateway)
Expand Down

0 comments on commit 88f78d9

Please sign in to comment.