test

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

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

func (GoLogger) DebugDynamic(l func() string)

DebugDynamic debug log print @param l

func (GoLogger) Debugf

func (GoLogger) Debugf(format string, args ...interface{})

Debugf debug log with format print @param format @param args

func (GoLogger) Debugw

func (GoLogger) Debugw(msg string, keysAndValues ...interface{})

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

func (GoLogger) Errorf(format string, args ...interface{})

Errorf error log print @param format @param args

func (GoLogger) Errorw

func (GoLogger) Errorw(msg string, keysAndValues ...interface{})

Errorw error log print @param msg @param keysAndValues

func (GoLogger) Fatal

func (GoLogger) Fatal(args ...interface{})

Fatal log.Fatal @param args

func (GoLogger) Fatalf

func (GoLogger) Fatalf(format string, args ...interface{})

Fatalf log.Fatalf @param format @param args

func (GoLogger) Fatalw

func (GoLogger) Fatalw(msg string, keysAndValues ...interface{})

Fatalw log.Fatalf @param msg @param keysAndValues

func (GoLogger) Info

func (GoLogger) Info(args ...interface{})

Info info log print @param args

func (GoLogger) InfoDynamic

func (GoLogger) InfoDynamic(l func() string)

InfoDynamic info log print @param l

func (GoLogger) Infof

func (GoLogger) Infof(format string, args ...interface{})

Infof info log print @param format @param args

func (GoLogger) Infow

func (GoLogger) Infow(msg string, keysAndValues ...interface{})

Infow info log print @param msg @param keysAndValues

func (GoLogger) Panic

func (GoLogger) Panic(args ...interface{})

Panic log.Panic @param args

func (GoLogger) Panicf

func (GoLogger) Panicf(format string, args ...interface{})

Panicf log.Panicf @param format @param args

func (GoLogger) Panicw

func (GoLogger) Panicw(msg string, keysAndValues ...interface{})

Panicw log.Panicf @param msg @param keysAndValues

func (GoLogger) Warn

func (GoLogger) Warn(args ...interface{})

Warn warn log print @param args

func (GoLogger) Warnf

func (GoLogger) Warnf(format string, args ...interface{})

Warnf warn log print @param format @param args

func (GoLogger) Warnw

func (GoLogger) Warnw(msg string, keysAndValues ...interface{})

Warnw warn log print @param msg @param keysAndValues

type HoleLogger

type HoleLogger struct {
}

HoleLogger do record nothing 不做任何日志记录的Logger,主要用于BenchmarkTest性能测试的场景

func (HoleLogger) Debug

func (h HoleLogger) Debug(args ...interface{})

Debug nothing @param args

func (HoleLogger) DebugDynamic

func (h HoleLogger) DebugDynamic(getStr func() string)

DebugDynamic nothing @param getStr

func (HoleLogger) Debugf

func (h HoleLogger) Debugf(format string, args ...interface{})

Debugf nothing @param format @param args

func (HoleLogger) Debugw

func (h HoleLogger) Debugw(msg string, keysAndValues ...interface{})

Debugw nothing @param msg @param keysAndValues

func (HoleLogger) Error

func (h HoleLogger) Error(args ...interface{})

Error nothing @param args

func (HoleLogger) Errorf

func (h HoleLogger) Errorf(format string, args ...interface{})

Errorf nothing @param format @param args

func (HoleLogger) Errorw

func (h HoleLogger) Errorw(msg string, keysAndValues ...interface{})

Errorw nothing @param msg @param keysAndValues

func (HoleLogger) Fatal

func (h HoleLogger) Fatal(args ...interface{})

Fatal os.Exit(1) @param args

func (HoleLogger) Fatalf

func (h HoleLogger) Fatalf(format string, args ...interface{})

Fatalf os.Exit(1) @param format @param args

func (HoleLogger) Fatalw

func (h HoleLogger) Fatalw(msg string, keysAndValues ...interface{})

Fatalw os.Exit(1) @param msg @param keysAndValues

func (HoleLogger) Info

func (h HoleLogger) Info(args ...interface{})

Info nothing @param args

func (HoleLogger) InfoDynamic

func (h HoleLogger) InfoDynamic(getStr func() string)

InfoDynamic nothing @param getStr

func (HoleLogger) Infof

func (h HoleLogger) Infof(format string, args ...interface{})

Infof nothing @param format @param args

func (HoleLogger) Infow

func (h HoleLogger) Infow(msg string, keysAndValues ...interface{})

Infow nothing @param msg @param keysAndValues

func (HoleLogger) Panic

func (h HoleLogger) Panic(args ...interface{})

Panic nothing @param args

func (HoleLogger) Panicf

func (h HoleLogger) Panicf(format string, args ...interface{})

Panicf panic @param format @param args

func (HoleLogger) Panicw

func (h HoleLogger) Panicw(msg string, keysAndValues ...interface{})

Panicw panic @param msg @param keysAndValues

func (HoleLogger) Warn

func (h HoleLogger) Warn(args ...interface{})

Warn nothing @param args

func (HoleLogger) Warnf

func (h HoleLogger) Warnf(format string, args ...interface{})

Warnf nothing @param format @param args

func (HoleLogger) Warnw

func (h HoleLogger) Warnw(msg string, keysAndValues ...interface{})

Warnw nothing @param msg @param keysAndValues

type TestLogger

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

func NewTestLogger(t testing.TB) *TestLogger

NewTestLogger TestLogger constructor @param t @return *TestLogger

func (TestLogger) Debug

func (l TestLogger) Debug(args ...interface{})

Debug debug log print @param args

func (TestLogger) DebugDynamic

func (l TestLogger) DebugDynamic(lf func() string)

DebugDynamic debug log print @param lf

func (TestLogger) Debugf

func (l TestLogger) Debugf(format string, args ...interface{})

Debugf debug log print @param format @param args

func (TestLogger) Debugw

func (l TestLogger) Debugw(msg string, keysAndValues ...interface{})

Debugw debug log print @param msg @param keysAndValues

func (TestLogger) Error

func (l TestLogger) Error(args ...interface{})

Error error log print @param args

func (TestLogger) Errorf

func (l TestLogger) Errorf(format string, args ...interface{})

Errorf error log print @param format @param args

func (TestLogger) Errorw

func (l TestLogger) Errorw(msg string, keysAndValues ...interface{})

Errorw error log print @param msg @param keysAndValues

func (TestLogger) Fatal

func (l TestLogger) Fatal(args ...interface{})

Fatal t.Fatal @param args

func (TestLogger) Fatalf

func (l TestLogger) Fatalf(format string, args ...interface{})

Fatalf t.Fatalf @param format @param args

func (TestLogger) Fatalw

func (l TestLogger) Fatalw(msg string, keysAndValues ...interface{})

Fatalw t.Fatalf @param msg @param keysAndValues

func (TestLogger) Info

func (l TestLogger) Info(args ...interface{})

Info info log print @param args

func (TestLogger) InfoDynamic

func (l TestLogger) InfoDynamic(lf func() string)

InfoDynamic info log print @param lf

func (TestLogger) Infof

func (l TestLogger) Infof(format string, args ...interface{})

Infof info log print @param format @param args

func (TestLogger) Infow

func (l TestLogger) Infow(msg string, keysAndValues ...interface{})

Infow info log print @param msg @param keysAndValues

func (TestLogger) Panic

func (l TestLogger) Panic(args ...interface{})

Panic log print and panic @param args

func (TestLogger) Panicf

func (l TestLogger) Panicf(format string, args ...interface{})

Panicf log print and panic @param format @param args

func (TestLogger) Panicw

func (l TestLogger) Panicw(m string, keysAndValues ...interface{})

Panicw log print and panic @param m @param keysAndValues

func (TestLogger) Warn

func (l TestLogger) Warn(args ...interface{})

Warn warn log print @param args

func (TestLogger) Warnf

func (l TestLogger) Warnf(format string, args ...interface{})

Warnf warn log print @param format @param args

func (TestLogger) Warnw

func (l TestLogger) Warnw(msg string, keysAndValues ...interface{})

Warnw warn log print @param msg @param keysAndValues

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL