Documentation ¶
Overview ¶
Package logger universal tool package
Index ¶
- type DefaultLogger
- func (logger *DefaultLogger) Debug(ctx context.Context, v ...any)
- func (logger *DefaultLogger) Debugf(ctx context.Context, format string, v ...any)
- func (logger *DefaultLogger) Error(ctx context.Context, v ...any)
- func (logger *DefaultLogger) Errorf(ctx context.Context, format string, v ...any)
- func (logger *DefaultLogger) Fatal(ctx context.Context, v ...any)
- func (logger *DefaultLogger) Fatalf(ctx context.Context, format string, v ...any)
- func (logger *DefaultLogger) Info(ctx context.Context, v ...any)
- func (logger *DefaultLogger) Infof(ctx context.Context, format string, v ...any)
- func (logger *DefaultLogger) Warning(ctx context.Context, v ...any)
- func (logger *DefaultLogger) Warningf(ctx context.Context, format string, v ...any)
- type ILogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
DefaultLogger 默认日志
func (*DefaultLogger) Debug ¶
func (logger *DefaultLogger) Debug(ctx context.Context, v ...any)
Debug 调试
func (*DefaultLogger) Debugf ¶
func (logger *DefaultLogger) Debugf(ctx context.Context, format string, v ...any)
Debugf 调试
func (*DefaultLogger) Error ¶
func (logger *DefaultLogger) Error(ctx context.Context, v ...any)
Error 错误
func (*DefaultLogger) Errorf ¶
func (logger *DefaultLogger) Errorf(ctx context.Context, format string, v ...any)
Errorf 错误
func (*DefaultLogger) Fatal ¶
func (logger *DefaultLogger) Fatal(ctx context.Context, v ...any)
Fatal 致命错误
func (*DefaultLogger) Fatalf ¶
func (logger *DefaultLogger) Fatalf(ctx context.Context, format string, v ...any)
Fatalf 致命错误
func (*DefaultLogger) Info ¶
func (logger *DefaultLogger) Info(ctx context.Context, v ...any)
Info 信息
func (*DefaultLogger) Infof ¶
func (logger *DefaultLogger) Infof(ctx context.Context, format string, v ...any)
Infof 信息
type ILogger ¶
type ILogger interface { Debug(ctx context.Context, v ...interface{}) Debugf(ctx context.Context, format string, v ...interface{}) Info(ctx context.Context, v ...interface{}) Infof(ctx context.Context, format string, v ...interface{}) Warning(ctx context.Context, v ...interface{}) Warningf(ctx context.Context, format string, v ...interface{}) Error(ctx context.Context, v ...interface{}) Errorf(ctx context.Context, format string, v ...interface{}) Fatal(ctx context.Context, v ...interface{}) Fatalf(ctx context.Context, format string, v ...interface{}) }
ILogger is the API interface for logger.
Click to show internal directories.
Click to hide internal directories.