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 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 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 ¶
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 }
Click to show internal directories.
Click to hide internal directories.