diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-23 04:43:36 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-23 04:43:36 +0800 |
commit | 8b1b9fc99d63a19c216edebc07096718e835937d (patch) | |
tree | 8a04499cb63dd8d91fd136f65c29605844c5bae8 /logger/loggers_test.go | |
parent | 8ed4f226d1dbecc9625a2f142e22926569198b73 (diff) | |
parent | 0edb33566fbe20863c884e553e214ed9b78b0f23 (diff) | |
download | dexon-8b1b9fc99d63a19c216edebc07096718e835937d.tar dexon-8b1b9fc99d63a19c216edebc07096718e835937d.tar.gz dexon-8b1b9fc99d63a19c216edebc07096718e835937d.tar.bz2 dexon-8b1b9fc99d63a19c216edebc07096718e835937d.tar.lz dexon-8b1b9fc99d63a19c216edebc07096718e835937d.tar.xz 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 'logger/loggers_test.go')
-rw-r--r-- | logger/loggers_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/logger/loggers_test.go b/logger/loggers_test.go index adc4df016..276b65b78 100644 --- a/logger/loggers_test.go +++ b/logger/loggers_test.go @@ -15,9 +15,11 @@ type TestLogSystem struct { level LogLevel } -func (ls *TestLogSystem) LogPrint(level LogLevel, msg string) { +func (ls *TestLogSystem) LogPrint(msg LogMsg) { ls.mutex.Lock() - ls.output += msg + if ls.level >= msg.Level() { + ls.output += msg.String() + } ls.mutex.Unlock() } @@ -47,9 +49,9 @@ type blockedLogSystem struct { unblock chan struct{} } -func (ls blockedLogSystem) LogPrint(level LogLevel, msg string) { +func (ls blockedLogSystem) LogPrint(msg LogMsg) { <-ls.unblock - ls.LogSystem.LogPrint(level, msg) + ls.LogSystem.LogPrint(msg) } func TestLoggerFlush(t *testing.T) { |