diff --git a/client_test.go b/client_test.go index ef7cf1b..017943a 100644 --- a/client_test.go +++ b/client_test.go @@ -17,11 +17,11 @@ func TestClient(t *testing.T) { In: make(chan *protocol.Instruction, 100), State: SessionActive, done: make(chan bool), - logger: &DiscardLogger{}, + logger: &DefaultLogger{Quiet: true}, tunnel: t, protocol: "vnc", } - c, _ := NewClient(s, &DiscardLogger{}) + c, _ := NewClient(s, &DefaultLogger{Quiet: true}) Convey("It exposes the session state", func() { s.State = SessionHandshake diff --git a/log.go b/log.go index 0419dbb..e3c8b42 100644 --- a/log.go +++ b/log.go @@ -46,16 +46,3 @@ func (l *DefaultLogger) Errorf(format string, args ...interface{}) { log.Printf("ERRO: "+format, args...) } } - -// Logger that discards all messages -type DiscardLogger struct{} - -func (d *DiscardLogger) Tracef(format string, args ...interface{}) {} - -func (d *DiscardLogger) Debugf(format string, args ...interface{}) {} - -func (d *DiscardLogger) Infof(format string, args ...interface{}) {} - -func (d *DiscardLogger) Warnf(format string, args ...interface{}) {} - -func (d *DiscardLogger) Errorf(format string, args ...interface{}) {}