Documentation ¶
Index ¶
- func Connect(dbtype, host string, port int, ...) (*gorm.DB, error)
- type GormLogger
- func (l GormLogger) Error(ctx context.Context, msg string, data ...interface{})
- func (l GormLogger) Info(ctx context.Context, msg string, data ...interface{})
- func (l *GormLogger) LogMode(level logger.LogLevel) logger.Interface
- func (*GormLogger) Print(v ...interface{})
- func (l GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l GormLogger) Warn(ctx context.Context, msg string, data ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GormLogger ¶
type GormLogger struct { LogLevel logger.LogLevel IgnoreRecordNotFoundError bool SlowThreshold time.Duration LogTrace bool }
GormLogger struct
func (GormLogger) Error ¶
func (l GormLogger) Error(ctx context.Context, msg string, data ...interface{})
Error print error messages
func (GormLogger) Info ¶
func (l GormLogger) Info(ctx context.Context, msg string, data ...interface{})
Info print info
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.