From 60df851718242c91dee9619f9e65b810aabb4a42 Mon Sep 17 00:00:00 2001 From: tanghuaicheng Date: Fri, 2 Aug 2019 13:27:24 +0800 Subject: [PATCH] add log --- util/service/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/service/client.go b/util/service/client.go index 73bf0ff..1f3c79a 100644 --- a/util/service/client.go +++ b/util/service/client.go @@ -154,19 +154,19 @@ func (m *ClientThrift) newClient(addr string) rpcClient { transport, err := thrift.NewTSocket(addr) if err != nil { - slog.Errorf("%s NetTSocket addr:%s err:%s", fun, addr, err) + slog.Errorf("%s NetTSocket addr:%s serv:%s err:%s", fun, addr, m.clientLookup.ServKey(), err) return nil } useTransport := transportFactory.GetTransport(transport) if err := useTransport.Open(); err != nil { - slog.Errorf("%s Open addr:%s err:%s", fun, addr, err) + slog.Errorf("%s Open addr:%s serv:%s err:%s", fun, addr, m.clientLookup.ServKey(), err) return nil } // 必须要close么? //useTransport.Close() - slog.Infof("%s new client addr:%s", fun, addr) + slog.Infof("%s new client addr:%s serv:%s", fun, addr, m.clientLookup.ServKey()) return &rpcClient1{ tsock: transport, trans: useTransport,