Documentation ¶
Index ¶
- func GinLogger() gin.HandlerFunc
- func GinRecovery(stack bool) gin.HandlerFunc
- type ContextFn
- type GORMAdapter
- func (a GORMAdapter) Error(ctx context.Context, str string, args ...interface{})
- func (a GORMAdapter) Info(ctx context.Context, str string, args ...interface{})
- func (a GORMAdapter) LogMode(level gormLogger.LogLevel) gormLogger.Interface
- func (a GORMAdapter) SetAsDefault()
- func (a GORMAdapter) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (a GORMAdapter) Warn(ctx context.Context, str string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinLogger ¶
func GinLogger() gin.HandlerFunc
func GinRecovery ¶
func GinRecovery(stack bool) gin.HandlerFunc
Types ¶
type GORMAdapter ¶
type GORMAdapter struct { ZapLogger *zap.Logger LogLevel gormLogger.LogLevel SlowThreshold time.Duration SkipCallerLookup bool IgnoreRecordNotFoundError bool Context ContextFn }
GORMAdapter Modified from "moul.io/zapgorm2"
func NewGORMAdapter ¶
func NewGORMAdapter(zapLogger *zap.Logger) GORMAdapter
func (GORMAdapter) Error ¶
func (a GORMAdapter) Error(ctx context.Context, str string, args ...interface{})
func (GORMAdapter) Info ¶
func (a GORMAdapter) Info(ctx context.Context, str string, args ...interface{})
func (GORMAdapter) LogMode ¶
func (a GORMAdapter) LogMode(level gormLogger.LogLevel) gormLogger.Interface
func (GORMAdapter) SetAsDefault ¶
func (a GORMAdapter) SetAsDefault()
Click to show internal directories.
Click to hide internal directories.