aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-23 04:43:36 +0800
committerobscuren <geffobscura@gmail.com>2015-03-23 04:43:36 +0800
commit8b1b9fc99d63a19c216edebc07096718e835937d (patch)
tree8a04499cb63dd8d91fd136f65c29605844c5bae8 /blockpool
parent8ed4f226d1dbecc9625a2f142e22926569198b73 (diff)
parent0edb33566fbe20863c884e553e214ed9b78b0f23 (diff)
downloaddexon-8b1b9fc99d63a19c216edebc07096718e835937d.tar.gz
dexon-8b1b9fc99d63a19c216edebc07096718e835937d.tar.zst
dexon-8b1b9fc99d63a19c216edebc07096718e835937d.zip
Merge branch 'jsonlog' of https://github.com/ethersphere/go-ethereum into ethersphere-jsonlog
Conflicts: eth/backend.go
Diffstat (limited to 'blockpool')
-rw-r--r--blockpool/test/logger.go18
1 files changed, 6 insertions, 12 deletions
diff --git a/blockpool/test/logger.go b/blockpool/test/logger.go
index bcb4d4cb3..2828ffc83 100644
--- a/blockpool/test/logger.go
+++ b/blockpool/test/logger.go
@@ -21,8 +21,7 @@ func TestFunc(t *testing.T) {
*/
func LogInit() {
once.Do(func() {
- var logsys = logger.NewStdLogSystem(os.Stdout, log.LstdFlags, logger.LogLevel(logger.WarnLevel))
- logger.AddLogSystem(logsys)
+ logger.NewStdLogSystem(os.Stdout, log.LstdFlags, logger.LogLevel(logger.DebugDetailLevel))
})
}
@@ -41,11 +40,8 @@ func Testlog(t *testing.T) testLogger {
return l
}
-func (testLogger) GetLogLevel() logger.LogLevel { return logger.DebugLevel }
-func (testLogger) SetLogLevel(logger.LogLevel) {}
-
-func (l testLogger) LogPrint(level logger.LogLevel, msg string) {
- l.t.Logf("%s", msg)
+func (l testLogger) LogPrint(msg logger.LogMsg) {
+ l.t.Log(msg.String())
}
func (testLogger) Detach() {
@@ -68,12 +64,10 @@ func Benchlog(b *testing.B) benchLogger {
return l
}
-func (benchLogger) GetLogLevel() logger.LogLevel { return logger.Silence }
-
-func (benchLogger) SetLogLevel(logger.LogLevel) {}
-func (l benchLogger) LogPrint(level logger.LogLevel, msg string) {
- l.b.Logf("%s", msg)
+func (l benchLogger) LogPrint(msg logger.LogMsg) {
+ l.b.Log(msg.String())
}
+
func (benchLogger) Detach() {
logger.Flush()
logger.Reset()