Documentation
¶
Index ¶
- func TraceID(ctx context.Context) string
- func WithTraceID(ctx context.Context, id string) context.Context
- type Logger
- func (l *Logger) Error(ctx context.Context, msg string, data ...any)
- func (l *Logger) Info(ctx context.Context, msg string, data ...any)
- func (l *Logger) LogMode(level gormlogger.LogLevel) gormlogger.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *Logger) Warn(ctx context.Context, msg string, data ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
logger.Logger
LogLevel gormlogger.LogLevel
}
Logger 自定义GORM logger实现
func (*Logger) LogMode ¶
func (l *Logger) LogMode(level gormlogger.LogLevel) gormlogger.Interface
LogMode 设置日志级别
Click to show internal directories.
Click to hide internal directories.