Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormLog ¶
type GormLoggerCallbacks ¶
type GormLoggerCallbacks struct { // 慢sql阈值 SlowThreshold time.Duration // contains filtered or unexported fields }
GormLoggerCallbacks 利用callback实现的gorm plugin 用来替换gorm自带的logger
func NewGormLoggerCallBacks ¶
func NewGormLoggerCallBacks(l logger.Logger, s time.Duration) *GormLoggerCallbacks
func (*GormLoggerCallbacks) Initialize ¶
func (c *GormLoggerCallbacks) Initialize(db *gorm.DB) error
func (*GormLoggerCallbacks) Name ¶
func (c *GormLoggerCallbacks) Name() string
Click to show internal directories.
Click to hide internal directories.