dlog

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogfLogger added in v0.5.0

type LogfLogger interface {
	Logf(string, ...any)
}

type Logger

type Logger interface {
	PrintfLogger
	Infof(string, ...any)
	Warnf(string, ...any)
	Errorf(string, ...any)
}

func DefaultPrintfLogger added in v0.5.4

func DefaultPrintfLogger(l PrintfLogger) Logger

默认的Logger构造函数,会打印出所有WARN level以上的LOG

func NewLoggerForTest added in v0.5.0

func NewLoggerForTest(t *testing.T) Logger

func VerbosePrintfLogger added in v0.5.4

func VerbosePrintfLogger(l PrintfLogger) Logger

这个方法会打印出所有的INFO level的LOG

func WarnPrintfLogger added in v0.5.4

func WarnPrintfLogger(l PrintfLogger) Logger

这个方法会打印出所有的WARN level以上的LOG

type PrintfLogger

type PrintfLogger interface {
	Printf(string, ...any)
}

func NewPrintfLoggerFromLogfLogger added in v0.5.0

func NewPrintfLoggerFromLogfLogger(logger LogfLogger) PrintfLogger

type PrintfLoggerFromLogfLogger added in v0.5.0

type PrintfLoggerFromLogfLogger struct {
	Log LogfLogger
}

func (*PrintfLoggerFromLogfLogger) Printf added in v0.5.0

func (l *PrintfLoggerFromLogfLogger) Printf(fmt string, args ...any)

type StdLogger

type StdLogger struct {
	Log        PrintfLogger
	LogVerbose bool
}

func (*StdLogger) Errorf

func (l *StdLogger) Errorf(format string, args ...any)

func (*StdLogger) Infof

func (l *StdLogger) Infof(format string, args ...any)

func (*StdLogger) Printf

func (l *StdLogger) Printf(format string, args ...any)

func (*StdLogger) Warnf

func (l *StdLogger) Warnf(format string, args ...any)

Jump to

Keyboard shortcuts

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