|
|
@ -107,11 +107,11 @@ func TestLoggerPrintf(t *testing.T) { |
|
|
|
testLogSystem := &TestLogSystem{level: WarnLevel} |
|
|
|
testLogSystem := &TestLogSystem{level: WarnLevel} |
|
|
|
AddLogSystem(testLogSystem) |
|
|
|
AddLogSystem(testLogSystem) |
|
|
|
logger.Errorf("error to %v\n", []int{1, 2, 3}) |
|
|
|
logger.Errorf("error to %v\n", []int{1, 2, 3}) |
|
|
|
logger.Warnf("warn") |
|
|
|
logger.Warnf("warn %%d %d", 5) |
|
|
|
logger.Infof("info") |
|
|
|
logger.Infof("info") |
|
|
|
logger.Debugf("debug") |
|
|
|
logger.Debugf("debug") |
|
|
|
Flush() |
|
|
|
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) { |
|
|
|
func TestMultipleLogSystems(t *testing.T) { |
|
|
|