Documentation ¶
Index ¶
- type Logger
- func (l *Logger) Error(ctx context.Context, s string, args ...any)
- func (l *Logger) Info(ctx context.Context, s string, args ...any)
- func (l *Logger) LogMode(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, s string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct { SlowThreshold time.Duration // Duration after which a query is considered slow SourceField string // Field for the source of the log SkipErrRecordNotFound bool // Flag to skip logging "record not found" errors Debug bool // Flag to enable debug logging }
Logger struct to customise GORM logging behaviour.
func (*Logger) LogMode ¶
func (l *Logger) LogMode(gormLogger.LogLevel) gormLogger.Interface
LogMode for GORM logger interface, currently a no-op.
Click to show internal directories.
Click to hide internal directories.