mirror of https://github.com/status-im/op-geth.git
Moved log to debug
This commit is contained in:
parent
46898f1e55
commit
663fd8f849
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/logger"
|
"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
|
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) {
|
func (self Error) Log(log *logger.Logger) {
|
||||||
log.Sendln(self.level, self)
|
log.Sendln(self.level, self)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
err.Fatal() is true if err's severity level is 0 or 1 (logger.ErrorLevel or logger.Silence)
|
err.Fatal() is true if err's severity level is 0 or 1 (logger.ErrorLevel or logger.Silence)
|
||||||
|
|
|
@ -8,6 +8,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/ethereum/go-ethereum/errs"
|
"github.com/ethereum/go-ethereum/errs"
|
||||||
"github.com/ethereum/go-ethereum/logger"
|
"github.com/ethereum/go-ethereum/logger"
|
||||||
|
"github.com/ethereum/go-ethereum/logger/glog"
|
||||||
"github.com/ethereum/go-ethereum/p2p"
|
"github.com/ethereum/go-ethereum/p2p"
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"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) {
|
func (self *ethProtocol) protoError(code int, format string, params ...interface{}) (err *errs.Error) {
|
||||||
err = self.errors.New(code, format, params...)
|
err = self.errors.New(code, format, params...)
|
||||||
err.Log(self.peer.Logger)
|
//err.Log(self.peer.Logger)
|
||||||
|
err.Log(glog.V(logger.Info))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,8 +384,11 @@ func (self *ethProtocol) sendStatus() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *ethProtocol) protoErrorDisconnect(err *errs.Error) {
|
func (self *ethProtocol) protoErrorDisconnect(err *errs.Error) {
|
||||||
err.Log(self.peer.Logger)
|
//err.Log(self.peer.Logger)
|
||||||
if err.Fatal() {
|
err.Log(glog.V(logger.Debug))
|
||||||
self.peer.Disconnect(p2p.DiscSubprotocolError)
|
/*
|
||||||
}
|
if err.Fatal() {
|
||||||
|
self.peer.Disconnect(p2p.DiscSubprotocolError)
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue