mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
new logging
This commit is contained in:
@ -26,7 +26,7 @@ func makeHTTPDialer(remoteAddr string) (string, func(string, string) (net.Conn,
|
||||
parts := strings.SplitN(remoteAddr, "://", 2)
|
||||
var protocol, address string
|
||||
if len(parts) != 2 {
|
||||
log.Warn("WARNING (tendermint/rpc/lib): Please use fully formed listening addresses, including the tcp:// or unix:// prefix")
|
||||
// log.Warn("WARNING (tendermint/rpc/lib): Please use fully formed listening addresses, including the tcp:// or unix:// prefix")
|
||||
protocol = types.SocketType(remoteAddr)
|
||||
address = remoteAddr
|
||||
} else {
|
||||
|
@ -1,7 +0,0 @@
|
||||
package rpcclient
|
||||
|
||||
import (
|
||||
"github.com/tendermint/log15"
|
||||
)
|
||||
|
||||
var log = log15.New("module", "rpcclient")
|
@ -37,7 +37,7 @@ func NewWSClient(remoteAddr, endpoint string) *WSClient {
|
||||
Endpoint: endpoint,
|
||||
Conn: nil,
|
||||
}
|
||||
wsClient.BaseService = *cmn.NewBaseService(log, "WSClient", wsClient)
|
||||
wsClient.BaseService = *cmn.NewBaseService(nil, "WSClient", wsClient)
|
||||
return wsClient
|
||||
}
|
||||
|
||||
@ -100,14 +100,14 @@ func (wsc *WSClient) receiveEventsRoutine() {
|
||||
for {
|
||||
_, data, err := wsc.ReadMessage()
|
||||
if err != nil {
|
||||
log.Info("WSClient failed to read message", "error", err, "data", string(data))
|
||||
wsc.Logger.Info("WSClient failed to read message", "error", err, "data", string(data))
|
||||
wsc.Stop()
|
||||
break
|
||||
} else {
|
||||
var response types.RPCResponse
|
||||
err := json.Unmarshal(data, &response)
|
||||
if err != nil {
|
||||
log.Info("WSClient failed to parse message", "error", err, "data", string(data))
|
||||
wsc.Logger.Info("WSClient failed to parse message", "error", err, "data", string(data))
|
||||
wsc.ErrorsCh <- err
|
||||
continue
|
||||
}
|
||||
|
Reference in New Issue
Block a user