From 3215cbf0d5b8f28724dc36a16693885cc63ad5c9 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Mon, 29 Dec 2014 19:41:46 -0800 Subject: [PATCH] use tendermint/log15 --- alert/log.go | 4 ++-- binary/log.go | 4 ++-- binary/reflect.go | 2 ++ cmd/log.go | 4 ++-- consensus/log.go | 4 ++-- consensus/reactor.go | 1 + mempool/log.go | 4 ++-- p2p/connection.go | 2 +- p2p/log.go | 4 ++-- p2p/upnp/log.go | 4 ++-- rpc/log.go | 4 ++-- state/log.go | 4 ++-- 12 files changed, 22 insertions(+), 19 deletions(-) diff --git a/alert/log.go b/alert/log.go index 39e938f16..e281e7626 100644 --- a/alert/log.go +++ b/alert/log.go @@ -1,7 +1,7 @@ package alert import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "alert") \ No newline at end of file +var log = log15.New("module", "alert") diff --git a/binary/log.go b/binary/log.go index 5e0a16528..f62db263d 100644 --- a/binary/log.go +++ b/binary/log.go @@ -1,7 +1,7 @@ package binary import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "binary") \ No newline at end of file +var log = log15.New("module", "binary") diff --git a/binary/reflect.go b/binary/reflect.go index 72b74656a..c9d7eb2cc 100644 --- a/binary/reflect.go +++ b/binary/reflect.go @@ -88,6 +88,8 @@ func RegisterType(info *TypeInfo) *TypeInfo { func readReflect(rv reflect.Value, rt reflect.Type, r Unreader, n *int64, err *error) { + log.Debug("Read reflect", "type", rt) + // First, create a new struct if rv is nil pointer. if rt.Kind() == reflect.Ptr && rv.IsNil() { newRv := reflect.New(rt.Elem()) diff --git a/cmd/log.go b/cmd/log.go index fee37e777..15a99f2e5 100644 --- a/cmd/log.go +++ b/cmd/log.go @@ -1,7 +1,7 @@ package main import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "main") \ No newline at end of file +var log = log15.New("module", "main") diff --git a/consensus/log.go b/consensus/log.go index bf44f9b95..82bb2eb40 100644 --- a/consensus/log.go +++ b/consensus/log.go @@ -1,7 +1,7 @@ package consensus import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "consensus") \ No newline at end of file +var log = log15.New("module", "consensus") diff --git a/consensus/reactor.go b/consensus/reactor.go index 11b1c3ae9..7d1cc2bfc 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -650,6 +650,7 @@ func DecodeMessage(bz []byte) (msgType byte, msg interface{}, err error) { msg = ReadBinary(&CommitStepMessage{}, r, n, &err) // Messages of data case msgTypeProposal: + r.ReadByte() // Consume the byte msg = ReadBinary(&Proposal{}, r, n, &err) case msgTypePart: msg = ReadBinary(&PartMessage{}, r, n, &err) diff --git a/mempool/log.go b/mempool/log.go index b9a775c9c..4f7fa06e7 100644 --- a/mempool/log.go +++ b/mempool/log.go @@ -1,7 +1,7 @@ package mempool import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "mempool") \ No newline at end of file +var log = log15.New("module", "mempool") diff --git a/p2p/connection.go b/p2p/connection.go index 2b3a4a15c..ff7345f16 100644 --- a/p2p/connection.go +++ b/p2p/connection.go @@ -13,7 +13,7 @@ import ( flow "code.google.com/p/mxk/go1/flowcontrol" . "github.com/tendermint/tendermint/binary" . "github.com/tendermint/tendermint/common" - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) const ( diff --git a/p2p/log.go b/p2p/log.go index 053b81db3..db98e362d 100644 --- a/p2p/log.go +++ b/p2p/log.go @@ -1,7 +1,7 @@ package p2p import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "p2p") \ No newline at end of file +var log = log15.New("module", "p2p") diff --git a/p2p/upnp/log.go b/p2p/upnp/log.go index c9505f919..30cf659a2 100644 --- a/p2p/upnp/log.go +++ b/p2p/upnp/log.go @@ -1,7 +1,7 @@ package upnp import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "upnp") \ No newline at end of file +var log = log15.New("module", "upnp") diff --git a/rpc/log.go b/rpc/log.go index c81df2260..ceb1b3f22 100644 --- a/rpc/log.go +++ b/rpc/log.go @@ -1,7 +1,7 @@ package rpc import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "rpc") \ No newline at end of file +var log = log15.New("module", "rpc") diff --git a/state/log.go b/state/log.go index 162d3a56c..ad01b0a6f 100644 --- a/state/log.go +++ b/state/log.go @@ -1,7 +1,7 @@ package state import ( - "gopkg.in/inconshreveable/log15.v2" + "github.com/tendermint/log15" ) -var log = log15.New("module", "state") \ No newline at end of file +var log = log15.New("module", "state")