Documentation ¶
Overview ¶
Package test is a test package.
Package test is a test package.
Package test is a test package.
Index ¶
- Constants
- type GoLogger
- func (GoLogger) Debug(args ...interface{})
- func (GoLogger) DebugDynamic(l func() string)
- func (GoLogger) Debugf(format string, args ...interface{})
- func (GoLogger) Debugw(msg string, keysAndValues ...interface{})
- func (GoLogger) Error(args ...interface{})
- func (GoLogger) Errorf(format string, args ...interface{})
- func (GoLogger) Errorw(msg string, keysAndValues ...interface{})
- func (GoLogger) Fatal(args ...interface{})
- func (GoLogger) Fatalf(format string, args ...interface{})
- func (GoLogger) Fatalw(msg string, keysAndValues ...interface{})
- func (GoLogger) Info(args ...interface{})
- func (GoLogger) InfoDynamic(l func() string)
- func (GoLogger) Infof(format string, args ...interface{})
- func (GoLogger) Infow(msg string, keysAndValues ...interface{})
- func (GoLogger) Panic(args ...interface{})
- func (GoLogger) Panicf(format string, args ...interface{})
- func (GoLogger) Panicw(msg string, keysAndValues ...interface{})
- func (GoLogger) Warn(args ...interface{})
- func (GoLogger) Warnf(format string, args ...interface{})
- func (GoLogger) Warnw(msg string, keysAndValues ...interface{})
- type HoleLogger
- func (h HoleLogger) Debug(args ...interface{})
- func (h HoleLogger) DebugDynamic(getStr func() string)
- func (h HoleLogger) Debugf(format string, args ...interface{})
- func (h HoleLogger) Debugw(msg string, keysAndValues ...interface{})
- func (h HoleLogger) Error(args ...interface{})
- func (h HoleLogger) Errorf(format string, args ...interface{})
- func (h HoleLogger) Errorw(msg string, keysAndValues ...interface{})
- func (h HoleLogger) Fatal(args ...interface{})
- func (h HoleLogger) Fatalf(format string, args ...interface{})
- func (h HoleLogger) Fatalw(msg string, keysAndValues ...interface{})
- func (h HoleLogger) Info(args ...interface{})
- func (h HoleLogger) InfoDynamic(getStr func() string)
- func (h HoleLogger) Infof(format string, args ...interface{})
- func (h HoleLogger) Infow(msg string, keysAndValues ...interface{})
- func (h HoleLogger) Panic(args ...interface{})
- func (h HoleLogger) Panicf(format string, args ...interface{})
- func (h HoleLogger) Panicw(msg string, keysAndValues ...interface{})
- func (h HoleLogger) Warn(args ...interface{})
- func (h HoleLogger) Warnf(format string, args ...interface{})
- func (h HoleLogger) Warnw(msg string, keysAndValues ...interface{})
- type TestLogger
- func (l TestLogger) Debug(args ...interface{})
- func (l TestLogger) DebugDynamic(lf func() string)
- func (l TestLogger) Debugf(format string, args ...interface{})
- func (l TestLogger) Debugw(msg string, keysAndValues ...interface{})
- func (l TestLogger) Error(args ...interface{})
- func (l TestLogger) Errorf(format string, args ...interface{})
- func (l TestLogger) Errorw(msg string, keysAndValues ...interface{})
- func (l TestLogger) Fatal(args ...interface{})
- func (l TestLogger) Fatalf(format string, args ...interface{})
- func (l TestLogger) Fatalw(msg string, keysAndValues ...interface{})
- func (l TestLogger) Info(args ...interface{})
- func (l TestLogger) InfoDynamic(lf func() string)
- func (l TestLogger) Infof(format string, args ...interface{})
- func (l TestLogger) Infow(msg string, keysAndValues ...interface{})
- func (l TestLogger) Panic(args ...interface{})
- func (l TestLogger) Panicf(format string, args ...interface{})
- func (l TestLogger) Panicw(m string, keysAndValues ...interface{})
- func (l TestLogger) Warn(args ...interface{})
- func (l TestLogger) Warnf(format string, args ...interface{})
- func (l TestLogger) Warnw(msg string, keysAndValues ...interface{})
Constants ¶
const ( // DEBUG debug string DEBUG = "DEBUG: " // ERROR error string ERROR = "ERROR: " // INFO info string INFO = "INFO: " // WARN warn string WARN = "WARN: " // ValSpace val string with space ValSpace = " %v" // ValNoSpace val string without space ValNoSpace = "%v" // NextLineString string with next line NextLineString = "\n%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoLogger ¶
type GoLogger struct{}
GoLogger is a golang system log implementation of protocol.Logger, it's for unit test
func (GoLogger) Debug ¶
func (GoLogger) Debug(args ...interface{})
Debug debug log print @param args
func (GoLogger) DebugDynamic ¶
DebugDynamic debug log print @param l
func (GoLogger) Debugf ¶
Debugf debug log with format print @param format @param args
func (GoLogger) Debugw ¶
Debugw debug log with KV print @param msg @param keysAndValues
func (GoLogger) Error ¶
func (GoLogger) Error(args ...interface{})
Error error log print @param args
func (GoLogger) Errorf ¶
Errorf error log print @param format @param args
func (GoLogger) Errorw ¶
Errorw error log print @param msg @param keysAndValues
func (GoLogger) Fatalf ¶
Fatalf log.Fatalf @param format @param args
func (GoLogger) Fatalw ¶
Fatalw log.Fatalf @param msg @param keysAndValues
func (GoLogger) InfoDynamic ¶
InfoDynamic info log print @param l
func (GoLogger) Infof ¶
Infof info log print @param format @param args
func (GoLogger) Infow ¶
Infow info log print @param msg @param keysAndValues
func (GoLogger) Panicf ¶
Panicf log.Panicf @param format @param args
func (GoLogger) Panicw ¶
Panicw log.Panicf @param msg @param keysAndValues
func (GoLogger) Warnf ¶
Warnf warn log print @param format @param args
type HoleLogger ¶ added in v2.2.0
type HoleLogger struct { }
HoleLogger do record nothing
func (HoleLogger) Debug ¶ added in v2.2.0
func (h HoleLogger) Debug(args ...interface{})
Debug nothing @param args
func (HoleLogger) DebugDynamic ¶ added in v2.2.0
func (h HoleLogger) DebugDynamic(getStr func() string)
DebugDynamic nothing @param getStr
func (HoleLogger) Debugf ¶ added in v2.2.0
func (h HoleLogger) Debugf(format string, args ...interface{})
Debugf nothing @param format @param args
func (HoleLogger) Debugw ¶ added in v2.2.0
func (h HoleLogger) Debugw(msg string, keysAndValues ...interface{})
Debugw nothing @param msg @param keysAndValues
func (HoleLogger) Error ¶ added in v2.2.0
func (h HoleLogger) Error(args ...interface{})
Error nothing @param args
func (HoleLogger) Errorf ¶ added in v2.2.0
func (h HoleLogger) Errorf(format string, args ...interface{})
Errorf nothing @param format @param args
func (HoleLogger) Errorw ¶ added in v2.2.0
func (h HoleLogger) Errorw(msg string, keysAndValues ...interface{})
Errorw nothing @param msg @param keysAndValues
func (HoleLogger) Fatal ¶ added in v2.2.0
func (h HoleLogger) Fatal(args ...interface{})
Fatal os.Exit(1) @param args
func (HoleLogger) Fatalf ¶ added in v2.2.0
func (h HoleLogger) Fatalf(format string, args ...interface{})
Fatalf os.Exit(1) @param format @param args
func (HoleLogger) Fatalw ¶ added in v2.2.0
func (h HoleLogger) Fatalw(msg string, keysAndValues ...interface{})
Fatalw os.Exit(1) @param msg @param keysAndValues
func (HoleLogger) Info ¶ added in v2.2.0
func (h HoleLogger) Info(args ...interface{})
Info nothing @param args
func (HoleLogger) InfoDynamic ¶ added in v2.2.0
func (h HoleLogger) InfoDynamic(getStr func() string)
InfoDynamic nothing @param getStr
func (HoleLogger) Infof ¶ added in v2.2.0
func (h HoleLogger) Infof(format string, args ...interface{})
Infof nothing @param format @param args
func (HoleLogger) Infow ¶ added in v2.2.0
func (h HoleLogger) Infow(msg string, keysAndValues ...interface{})
Infow nothing @param msg @param keysAndValues
func (HoleLogger) Panic ¶ added in v2.2.0
func (h HoleLogger) Panic(args ...interface{})
Panic nothing @param args
func (HoleLogger) Panicf ¶ added in v2.2.0
func (h HoleLogger) Panicf(format string, args ...interface{})
Panicf panic @param format @param args
func (HoleLogger) Panicw ¶ added in v2.2.0
func (h HoleLogger) Panicw(msg string, keysAndValues ...interface{})
Panicw panic @param msg @param keysAndValues
func (HoleLogger) Warn ¶ added in v2.2.0
func (h HoleLogger) Warn(args ...interface{})
Warn nothing @param args
func (HoleLogger) Warnf ¶ added in v2.2.0
func (h HoleLogger) Warnf(format string, args ...interface{})
Warnf nothing @param format @param args
func (HoleLogger) Warnw ¶ added in v2.2.0
func (h HoleLogger) Warnw(msg string, keysAndValues ...interface{})
Warnw nothing @param msg @param keysAndValues
type TestLogger ¶ added in v2.2.0
type TestLogger struct {
// contains filtered or unexported fields
}
TestLogger is a golang system log implementation of protocol.Logger, it's for unit test
func NewTestLogger ¶ added in v2.2.0
func NewTestLogger(t testing.TB) *TestLogger
NewTestLogger TestLogger constructor @param t @return *TestLogger
func (TestLogger) Debug ¶ added in v2.2.0
func (l TestLogger) Debug(args ...interface{})
Debug debug log print @param args
func (TestLogger) DebugDynamic ¶ added in v2.2.0
func (l TestLogger) DebugDynamic(lf func() string)
DebugDynamic debug log print @param lf
func (TestLogger) Debugf ¶ added in v2.2.0
func (l TestLogger) Debugf(format string, args ...interface{})
Debugf debug log print @param format @param args
func (TestLogger) Debugw ¶ added in v2.2.0
func (l TestLogger) Debugw(msg string, keysAndValues ...interface{})
Debugw debug log print @param msg @param keysAndValues
func (TestLogger) Error ¶ added in v2.2.0
func (l TestLogger) Error(args ...interface{})
Error error log print @param args
func (TestLogger) Errorf ¶ added in v2.2.0
func (l TestLogger) Errorf(format string, args ...interface{})
Errorf error log print @param format @param args
func (TestLogger) Errorw ¶ added in v2.2.0
func (l TestLogger) Errorw(msg string, keysAndValues ...interface{})
Errorw error log print @param msg @param keysAndValues
func (TestLogger) Fatal ¶ added in v2.2.0
func (l TestLogger) Fatal(args ...interface{})
Fatal t.Fatal @param args
func (TestLogger) Fatalf ¶ added in v2.2.0
func (l TestLogger) Fatalf(format string, args ...interface{})
Fatalf t.Fatalf @param format @param args
func (TestLogger) Fatalw ¶ added in v2.2.0
func (l TestLogger) Fatalw(msg string, keysAndValues ...interface{})
Fatalw t.Fatalf @param msg @param keysAndValues
func (TestLogger) Info ¶ added in v2.2.0
func (l TestLogger) Info(args ...interface{})
Info info log print @param args
func (TestLogger) InfoDynamic ¶ added in v2.2.0
func (l TestLogger) InfoDynamic(lf func() string)
InfoDynamic info log print @param lf
func (TestLogger) Infof ¶ added in v2.2.0
func (l TestLogger) Infof(format string, args ...interface{})
Infof info log print @param format @param args
func (TestLogger) Infow ¶ added in v2.2.0
func (l TestLogger) Infow(msg string, keysAndValues ...interface{})
Infow info log print @param msg @param keysAndValues
func (TestLogger) Panic ¶ added in v2.2.0
func (l TestLogger) Panic(args ...interface{})
Panic log print and panic @param args
func (TestLogger) Panicf ¶ added in v2.2.0
func (l TestLogger) Panicf(format string, args ...interface{})
Panicf log print and panic @param format @param args
func (TestLogger) Panicw ¶ added in v2.2.0
func (l TestLogger) Panicw(m string, keysAndValues ...interface{})
Panicw log print and panic @param m @param keysAndValues
func (TestLogger) Warn ¶ added in v2.2.0
func (l TestLogger) Warn(args ...interface{})
Warn warn log print @param args
func (TestLogger) Warnf ¶ added in v2.2.0
func (l TestLogger) Warnf(format string, args ...interface{})
Warnf warn log print @param format @param args
func (TestLogger) Warnw ¶ added in v2.2.0
func (l TestLogger) Warnw(msg string, keysAndValues ...interface{})
Warnw warn log print @param msg @param keysAndValues