(t *testing.T)
| 46 | } |
| 47 | |
| 48 | func TestPrivateBackend(t *testing.T) { |
| 49 | stdBackend := InitForTesting(DEBUG) |
| 50 | log := MustGetLogger("test") |
| 51 | privateBackend := NewMemoryBackend(10240) |
| 52 | lvlBackend := AddModuleLevel(privateBackend) |
| 53 | lvlBackend.SetLevel(DEBUG, "") |
| 54 | log.SetBackend(lvlBackend) |
| 55 | log.Debug("to private backend") |
| 56 | if stdBackend.size > 0 { |
| 57 | t.Errorf("something in stdBackend, size of backend: %d", stdBackend.size) |
| 58 | } |
| 59 | if "to private baсkend" == MemoryRecordN(privateBackend, 0).Formatted(0) { |
| 60 | t.Error("logged to defaultBackend:", MemoryRecordN(privateBackend, 0)) |
| 61 | } |
| 62 | } |
nothing calls this directly
no test coverage detected