Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { ForTest(t testing.T) Logger SetLevel(level LogLevel) GetLevel() LogLevel Log(level LogLevel, msg string) Logf(level LogLevel, fmt string, args ...interface{}) }
Logger can output logs when running tests.
type PrintfLogger ¶
type PrintfLogger struct {
// contains filtered or unexported fields
}
PrintfLogger is a logger using testing.T.Log for its output.
func (*PrintfLogger) ForTest ¶
func (l *PrintfLogger) ForTest(t testing.T) Logger
ForTest implements Logger.
func (*PrintfLogger) GetLevel ¶
func (l *PrintfLogger) GetLevel() LogLevel
GetLevel implements Logger.
func (*PrintfLogger) Log ¶
func (l *PrintfLogger) Log(level LogLevel, msg string)
Log implements Logger.
func (*PrintfLogger) Logf ¶
func (l *PrintfLogger) Logf(level LogLevel, format string, args ...interface{})
Logf implements Logger.
type TestLogger ¶
type TestLogger struct {
// contains filtered or unexported fields
}
TestLogger is a logger using testing.T.Log for its output.
func (*TestLogger) ForTest ¶
func (l *TestLogger) ForTest(t testing.T) Logger
ForTest implements Logger.
func (*TestLogger) Log ¶
func (l *TestLogger) Log(level LogLevel, msg string)
Log implements Logger.
func (*TestLogger) Logf ¶
func (l *TestLogger) Logf(level LogLevel, f string, args ...interface{})
Logf implements Logger.
Click to show internal directories.
Click to hide internal directories.