info->notice, debug->info

This commit is contained in:
Ethan Buchman
2015-07-19 22:44:40 +00:00
parent e087284a4f
commit bb4ca1407f
26 changed files with 239 additions and 239 deletions
+2 -2
View File
@@ -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
View File
@@ -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-- {
+4 -4
View File
@@ -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)
}
+2 -2
View File
@@ -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,