aboutsummaryrefslogtreecommitdiffstats
path: root/ethlog
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2014-10-16 16:48:33 +0800
committerFelix Lange <fjl@twurst.com>2014-10-17 23:23:29 +0800
commit50f5ba5b0cfdf02cd87a9070676bd3c21c217296 (patch)
tree3e5166417f68d91a082004fa1f3e2a84c781f06b /ethlog
parentcbd785cfe8801c240bbaaa6f21ebf3ab7045e4a3 (diff)
downloaddexon-50f5ba5b0cfdf02cd87a9070676bd3c21c217296.tar
dexon-50f5ba5b0cfdf02cd87a9070676bd3c21c217296.tar.gz
dexon-50f5ba5b0cfdf02cd87a9070676bd3c21c217296.tar.bz2
dexon-50f5ba5b0cfdf02cd87a9070676bd3c21c217296.tar.lz
dexon-50f5ba5b0cfdf02cd87a9070676bd3c21c217296.tar.xz
dexon-50f5ba5b0cfdf02cd87a9070676bd3c21c217296.tar.zst
dexon-50f5ba5b0cfdf02cd87a9070676bd3c21c217296.zip
ethlog: add test for '%' in log message
This test fails because the log message is formatted twice.
Diffstat (limited to 'ethlog')
-rw-r--r--ethlog/loggers_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethlog/loggers_test.go b/ethlog/loggers_test.go
index 0466a3d59..23f649312 100644
--- a/ethlog/loggers_test.go
+++ b/ethlog/loggers_test.go
@@ -107,11 +107,11 @@ func TestLoggerPrintf(t *testing.T) {
testLogSystem := &TestLogSystem{level: WarnLevel}
AddLogSystem(testLogSystem)
logger.Errorf("error to %v\n", []int{1, 2, 3})
- logger.Warnf("warn")
+ logger.Warnf("warn %%d %d", 5)
logger.Infof("info")
logger.Debugf("debug")
Flush()
- testLogSystem.CheckOutput(t, "[TEST] error to [1 2 3]\n[TEST] warn")
+ testLogSystem.CheckOutput(t, "[TEST] error to [1 2 3]\n[TEST] warn %d 5")
}
func TestMultipleLogSystems(t *testing.T) {