github.com/nsqio/nsq@v1.3.0/internal/test/logger.go (about)

     1  package test
     2  
     3  type Logger interface {
     4  	Output(maxdepth int, s string) error
     5  }
     6  
     7  type tbLog interface {
     8  	Log(...interface{})
     9  }
    10  
    11  type testLogger struct {
    12  	tbLog
    13  }
    14  
    15  func (tl *testLogger) Output(maxdepth int, s string) error {
    16  	tl.Log(s)
    17  	return nil
    18  }
    19  
    20  func NewTestLogger(tbl tbLog) Logger {
    21  	return &testLogger{tbl}
    22  }