Documentation
¶
Index ¶
- func Debug(format string, v ...any)
- func Error(format string, v ...any)
- func Fatal(format string, v ...any)
- func Info(format string, v ...any)
- func Panic(format string, v ...any)
- func Pure(format string, v ...any)
- func RegisterLogger(writer io.Writer)
- func Warn(format string, v ...any)
- type DefaultLogger
- func (l *DefaultLogger) Debug(stackoffset int, format string, v ...any)
- func (l *DefaultLogger) Error(stackoffset int, format string, v ...any)
- func (l *DefaultLogger) Fatal(stackoffset int, format string, v ...any)
- func (l *DefaultLogger) Info(stackoffset int, format string, v ...any)
- func (l *DefaultLogger) Panic(stackoffset int, format string, v ...any)
- func (l *DefaultLogger) Pure(stackoffset int, format string, v ...any)
- func (l *DefaultLogger) Warn(stackoffset int, format string, v ...any)
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
DefaultLogger default logger
func NewDefaultLogger ¶
func NewDefaultLogger(logger ...*log.Logger) *DefaultLogger
NewDefaultLogger create a default logger
func (*DefaultLogger) Debug ¶
func (l *DefaultLogger) Debug(stackoffset int, format string, v ...any)
Debug debug log
func (*DefaultLogger) Error ¶
func (l *DefaultLogger) Error(stackoffset int, format string, v ...any)
Error error log
func (*DefaultLogger) Fatal ¶
func (l *DefaultLogger) Fatal(stackoffset int, format string, v ...any)
Fatal fatal log and exit
func (*DefaultLogger) Info ¶
func (l *DefaultLogger) Info(stackoffset int, format string, v ...any)
Info info log
func (*DefaultLogger) Panic ¶
func (l *DefaultLogger) Panic(stackoffset int, format string, v ...any)
Panic panic log and cause a panic
type Logger ¶
type Logger interface { Pure(stackoffset int, format string, v ...any) Info(stackoffset int, format string, v ...any) Warn(stackoffset int, format string, v ...any) Error(stackoffset int, format string, v ...any) Panic(stackoffset int, format string, v ...any) Fatal(stackoffset int, format string, v ...any) Debug(stackoffset int, format string, v ...any) }
Logger application logger stackoffset is used to locate the position of the log in the calling stack
Click to show internal directories.
Click to hide internal directories.