Documentation ¶
Index ¶
- type Level
- type MyLogger
- type SimpleLogger
- func (l *SimpleLogger) Debug(msg string, v ...any)
- func (l *SimpleLogger) Error(msg string, v ...interface{})
- func (l *SimpleLogger) Fatal(msg string, v ...interface{})
- func (l *SimpleLogger) GetDefaultLogger() (*log.Logger, error)
- func (l *SimpleLogger) Info(msg string, v ...interface{})
- func (l *SimpleLogger) Trace(msg string, v ...any)
- func (l *SimpleLogger) TraceHttpRequest(handlerName string, r *http.Request)
- func (l *SimpleLogger) Warn(msg string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level int8
const ( // TraceLevel defines trace log level. TraceLevel Level = iota // DebugLevel defines debug log level. DebugLevel // InfoLevel defines info log level. InfoLevel // WarnLevel defines warn log level. WarnLevel // ErrorLevel defines error log level. ErrorLevel // FatalLevel defines fatal log level. FatalLevel )
type MyLogger ¶
type MyLogger interface { Trace(msg string, v ...interface{}) Debug(msg string, v ...interface{}) Info(msg string, v ...interface{}) Warn(msg string, v ...interface{}) Error(msg string, v ...interface{}) Fatal(msg string, v ...interface{}) GetDefaultLogger() (*log.Logger, error) TraceHttpRequest(handlerName string, r *http.Request) }
type SimpleLogger ¶
type SimpleLogger struct {
// contains filtered or unexported fields
}
func (*SimpleLogger) Debug ¶
func (l *SimpleLogger) Debug(msg string, v ...any)
func (*SimpleLogger) Error ¶
func (l *SimpleLogger) Error(msg string, v ...interface{})
func (*SimpleLogger) Fatal ¶
func (l *SimpleLogger) Fatal(msg string, v ...interface{})
func (*SimpleLogger) GetDefaultLogger ¶ added in v0.0.9
func (l *SimpleLogger) GetDefaultLogger() (*log.Logger, error)
func (*SimpleLogger) Info ¶
func (l *SimpleLogger) Info(msg string, v ...interface{})
func (*SimpleLogger) Trace ¶ added in v0.3.8
func (l *SimpleLogger) Trace(msg string, v ...any)
func (*SimpleLogger) TraceHttpRequest ¶ added in v0.3.8
func (l *SimpleLogger) TraceHttpRequest(handlerName string, r *http.Request)
func (*SimpleLogger) Warn ¶
func (l *SimpleLogger) Warn(msg string, v ...interface{})
Click to show internal directories.
Click to hide internal directories.