(t *testing.T)
| 7 | import "testing" |
| 8 | |
| 9 | func TestMultiLogger(t *testing.T) { |
| 10 | log1 := NewMemoryBackend(8) |
| 11 | log2 := NewMemoryBackend(8) |
| 12 | SetBackend(MultiLogger(log1, log2)) |
| 13 | |
| 14 | log := MustGetLogger("test") |
| 15 | log.Debug("log") |
| 16 | |
| 17 | if "log" != MemoryRecordN(log1, 0).Formatted(0) { |
| 18 | t.Errorf("log1: %v", MemoryRecordN(log1, 0).Formatted(0)) |
| 19 | } |
| 20 | if "log" != MemoryRecordN(log2, 0).Formatted(0) { |
| 21 | t.Errorf("log2: %v", MemoryRecordN(log2, 0).Formatted(0)) |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func TestMultiLoggerLevel(t *testing.T) { |
| 26 | log1 := NewMemoryBackend(8) |
nothing calls this directly
no test coverage detected