Documentation ¶
Index ¶
- type GormLogger
- func (l *GormLogger) Error(_ context.Context, msg string, data ...any)
- func (l *GormLogger) Info(_ context.Context, msg string, data ...any)
- func (l *GormLogger) IsIgnoreNotFound(err error) bool
- func (l *GormLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l *GormLogger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *GormLogger) Warn(_ context.Context, msg string, data ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormLogger ¶
type GormLogger struct { LogLevel logger.LogLevel SlowThreshold time.Duration IgnoreRecordNotFoundError bool *zap.SugaredLogger }
GormLogger gorm日志
func (*GormLogger) Error ¶
func (l *GormLogger) Error(_ context.Context, msg string, data ...any)
Error print error messages
func (*GormLogger) Info ¶
func (l *GormLogger) Info(_ context.Context, msg string, data ...any)
Info print info
func (*GormLogger) IsIgnoreNotFound ¶
func (l *GormLogger) IsIgnoreNotFound(err error) bool
IsIgnoreNotFound when we want to ignore NotFound Record error
func (*GormLogger) LogMode ¶
func (l *GormLogger) LogMode(level logger.LogLevel) logger.Interface
LogMode log mode
Click to show internal directories.
Click to hide internal directories.