mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
info->notice, debug->info
This commit is contained in:
@@ -22,7 +22,7 @@ func Call(remote string, method string, params []interface{}, dest interface{})
|
||||
}
|
||||
requestBytes := binary.JSONBytes(request)
|
||||
requestBuf := bytes.NewBuffer(requestBytes)
|
||||
log.Debug(Fmt("RPC request to %v: %v", remote, string(requestBytes)))
|
||||
log.Info(Fmt("RPC request to %v: %v", remote, string(requestBytes)))
|
||||
httpResponse, err := http.Post(remote, "text/json", requestBuf)
|
||||
if err != nil {
|
||||
return dest, err
|
||||
@@ -32,7 +32,7 @@ func Call(remote string, method string, params []interface{}, dest interface{})
|
||||
if err != nil {
|
||||
return dest, err
|
||||
}
|
||||
log.Debug(Fmt("RPC response: %v", string(responseBytes)))
|
||||
log.Info(Fmt("RPC response: %v", string(responseBytes)))
|
||||
|
||||
// Parse response into JSONResponse
|
||||
response := RPCResponse{}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ func BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResponseBlockchainInfo, e
|
||||
if minHeight == 0 {
|
||||
minHeight = MaxInt(1, maxHeight-20)
|
||||
}
|
||||
log.Debug("BlockchainInfoHandler", "maxHeight", maxHeight, "minHeight", minHeight)
|
||||
log.Info("BlockchainInfoHandler", "maxHeight", maxHeight, "minHeight", minHeight)
|
||||
|
||||
blockMetas := []*types.BlockMeta{}
|
||||
for height := maxHeight; height >= minHeight; height-- {
|
||||
|
||||
@@ -114,7 +114,7 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
returns := rpcFunc.f.Call(args)
|
||||
log.Debug("HTTPJSONRPC", "method", request.Method, "args", args, "returns", returns)
|
||||
log.Info("HTTPJSONRPC", "method", request.Method, "args", args, "returns", returns)
|
||||
response, err := unreflectResponse(returns)
|
||||
if err != nil {
|
||||
WriteRPCResponse(w, NewRPCResponse(nil, err.Error()))
|
||||
@@ -166,7 +166,7 @@ func makeHTTPHandler(rpcFunc *RPCFunc) func(http.ResponseWriter, *http.Request)
|
||||
return
|
||||
}
|
||||
returns := rpcFunc.f.Call(args)
|
||||
log.Debug("HTTPRestRPC", "method", r.URL.Path, "args", args, "returns", returns)
|
||||
log.Info("HTTPRestRPC", "method", r.URL.Path, "args", args, "returns", returns)
|
||||
response, err := unreflectResponse(returns)
|
||||
if err != nil {
|
||||
WriteRPCResponse(w, NewRPCResponse(nil, err.Error()))
|
||||
@@ -312,7 +312,7 @@ func (con *WSConnection) read() {
|
||||
}
|
||||
switch req.Type {
|
||||
case "subscribe":
|
||||
log.Info("New event subscription", "con id", con.id, "event", req.Event)
|
||||
log.Notice("New event subscription", "con id", con.id, "event", req.Event)
|
||||
con.evsw.AddListenerForEvent(con.id, req.Event, func(msg interface{}) {
|
||||
resp := WSResponse{
|
||||
Event: req.Event,
|
||||
@@ -388,7 +388,7 @@ func (wm *WebsocketManager) websocketHandler(w http.ResponseWriter, r *http.Requ
|
||||
|
||||
// register connection
|
||||
con := NewWSConnection(wsConn)
|
||||
log.Info("New websocket connection", "origin", con.id)
|
||||
log.Notice("New websocket connection", "origin", con.id)
|
||||
con.Start(wm.evsw)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
func StartHTTPServer(listenAddr string, handler http.Handler) (net.Listener, error) {
|
||||
log.Info(Fmt("Starting RPC HTTP server on %v", listenAddr))
|
||||
log.Notice(Fmt("Starting RPC HTTP server on %v", listenAddr))
|
||||
listener, err := net.Listen("tcp", listenAddr)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to listen to %v", listenAddr)
|
||||
@@ -84,7 +84,7 @@ func RecoverAndLogHandler(handler http.Handler) http.Handler {
|
||||
if rww.Status == -1 {
|
||||
rww.Status = 200
|
||||
}
|
||||
log.Debug("Served RPC HTTP response",
|
||||
log.Info("Served RPC HTTP response",
|
||||
"method", r.Method, "url", r.URL,
|
||||
"status", rww.Status, "duration", durationMS,
|
||||
"remoteAddr", r.RemoteAddr,
|
||||
|
||||
Reference in New Issue
Block a user