test

package
v2.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Overview

Package test is a test package.

Package test is a test package.

Package test is a test package.

Index

Constants

View Source
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

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 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

Jump to

Keyboard shortcuts

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