aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-09 23:19:05 +0800
committerobscuren <geffobscura@gmail.com>2015-04-09 23:19:05 +0800
commit663fd8f8491fcf10429388237cbb361856c6e49c (patch)
tree816456e6d44b124ac8c2dce814756f62e99a8ae0
parent46898f1e554a87b88d722bcf0ef3bfb2c9974736 (diff)
downloaddexon-663fd8f8491fcf10429388237cbb361856c6e49c.tar
dexon-663fd8f8491fcf10429388237cbb361856c6e49c.tar.gz
dexon-663fd8f8491fcf10429388237cbb361856c6e49c.tar.bz2
dexon-663fd8f8491fcf10429388237cbb361856c6e49c.tar.lz
dexon-663fd8f8491fcf10429388237cbb361856c6e49c.tar.xz
dexon-663fd8f8491fcf10429388237cbb361856c6e49c.tar.zst
dexon-663fd8f8491fcf10429388237cbb361856c6e49c.zip
Moved log to debug
-rw-r--r--errs/errors.go10
-rw-r--r--eth/protocol.go15
2 files changed, 20 insertions, 5 deletions
diff --git a/errs/errors.go b/errs/errors.go
index f1b0ebdbb..2e6c32494 100644
--- a/errs/errors.go
+++ b/errs/errors.go
@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/ethereum/go-ethereum/logger"
+ "github.com/ethereum/go-ethereum/logger/glog"
)
/*
@@ -76,9 +77,18 @@ func (self Error) Error() (message string) {
return self.message
}
+func (self Error) Log(v glog.Verbose) {
+ if v {
+ v.Infoln(self)
+ }
+ //log.Sendln(self.level, self)
+}
+
+/*
func (self Error) Log(log *logger.Logger) {
log.Sendln(self.level, self)
}
+*/
/*
err.Fatal() is true if err's severity level is 0 or 1 (logger.ErrorLevel or logger.Silence)
diff --git a/eth/protocol.go b/eth/protocol.go
index 09355cfcd..53855908b 100644
--- a/eth/protocol.go
+++ b/eth/protocol.go
@@ -8,6 +8,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/errs"
"github.com/ethereum/go-ethereum/logger"
+ "github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rlp"
)
@@ -366,7 +367,8 @@ func (self *ethProtocol) requestBlocks(hashes []common.Hash) error {
func (self *ethProtocol) protoError(code int, format string, params ...interface{}) (err *errs.Error) {
err = self.errors.New(code, format, params...)
- err.Log(self.peer.Logger)
+ //err.Log(self.peer.Logger)
+ err.Log(glog.V(logger.Info))
return
}
@@ -382,8 +384,11 @@ func (self *ethProtocol) sendStatus() error {
}
func (self *ethProtocol) protoErrorDisconnect(err *errs.Error) {
- err.Log(self.peer.Logger)
- if err.Fatal() {
- self.peer.Disconnect(p2p.DiscSubprotocolError)
- }
+ //err.Log(self.peer.Logger)
+ err.Log(glog.V(logger.Debug))
+ /*
+ if err.Fatal() {
+ self.peer.Disconnect(p2p.DiscSubprotocolError)
+ }
+ */
}