Documentation ¶
Index ¶
- func Debugf(format string, args ...any)
- func GetCallStackInfo(skip int) (string, int, string)
- func GetGoroutineID() uint64
- func Infof(format string, args ...any)
- func SetLoggerFactory(factory LoggerFactory)
- func WarnExWithPosf(fileName string, lineNo int, funName string, format string, args ...any)
- func Warnf(format string, args ...any)
- type ILogger
- type LoggerFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCallStackInfo ¶
GetCallStackInfo return fileName, lineNo, funName
func GetGoroutineID ¶
func GetGoroutineID() uint64
func SetLoggerFactory ¶
func SetLoggerFactory(factory LoggerFactory)
func WarnExWithPosf ¶
Types ¶
type ILogger ¶
type ILogger interface { Debugf(format string, args ...any) Infof(format string, args ...any) Warnf(format string, args ...any) WarnExWithPosf(fileName string, lineNo int, funName string, format string, args ...any) }
ILogger in go-library, provide WarnExWithPosf, so can used in verify, user should call `SetLoggerFactory` to customize the logger
type LoggerFactory ¶
type LoggerFactory func() ILogger
LoggerFactory is the factory method for creating logger used for the specified package.
Click to show internal directories.
Click to hide internal directories.