Documentation ¶
Overview ¶
Based on https://github.com/wei840222/gorm-zerolog/blob/main/logger.go
Index ¶
- func Debug(module string) *zerolog.Event
- func Error(module string) *zerolog.Event
- func Fatal(module string) *zerolog.Event
- func Gin() gin.HandlerFunc
- func Info(module string) *zerolog.Event
- func MultiOutput(app, logDir string)
- func Panic(module string) *zerolog.Event
- func Trace(module string) *zerolog.Event
- func Warn(module string) *zerolog.Event
- type GormLogger
- func (logger *GormLogger) Error(ctx context.Context, s string, args ...interface{})
- func (logger *GormLogger) Info(ctx context.Context, s string, args ...interface{})
- func (logger *GormLogger) LogMode(gormLogger.LogLevel) gormLogger.Interface
- func (logger *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (logger *GormLogger) Warn(ctx context.Context, s string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Gin ¶
func Gin() gin.HandlerFunc
func MultiOutput ¶
func MultiOutput(app, logDir string)
Types ¶
type GormLogger ¶
type GormLogger struct { SlowThreshold time.Duration SourceField string SkipErrRecordNotFound bool Logger zerolog.Logger }
func Gorm ¶
func Gorm() *GormLogger
func (*GormLogger) Error ¶
func (logger *GormLogger) Error(ctx context.Context, s string, args ...interface{})
func (*GormLogger) Info ¶
func (logger *GormLogger) Info(ctx context.Context, s string, args ...interface{})
func (*GormLogger) LogMode ¶
func (logger *GormLogger) LogMode(gormLogger.LogLevel) gormLogger.Interface
Click to show internal directories.
Click to hide internal directories.