Documentation
¶
Index ¶
- func Init()
- type GormLogger
- func (l *GormLogger) Error(ctx context.Context, s string, args ...interface{})
- func (l *GormLogger) Info(ctx context.Context, s string, args ...interface{})
- func (l *GormLogger) LogMode(gormlogger.LogLevel) gormlogger.Interface
- func (l *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *GormLogger) Warn(ctx context.Context, s string, args ...interface{})
- type LoggerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GormLogger ¶
type GormLogger struct {
SlowThreshold time.Duration
SourceField string
SkipErrRecordNotFound bool
Debug bool
}
func NewGormLogger ¶
func NewGormLogger() *GormLogger
func (*GormLogger) Error ¶
func (l *GormLogger) Error(ctx context.Context, s string, args ...interface{})
func (*GormLogger) Info ¶
func (l *GormLogger) Info(ctx context.Context, s string, args ...interface{})
func (*GormLogger) LogMode ¶
func (l *GormLogger) LogMode(gormlogger.LogLevel) gormlogger.Interface
type LoggerInterface ¶
type LoggerInterface interface {
Info(msg string, args ...interface{})
Error(msg string, args ...interface{})
Debug(msg string, args ...interface{})
Warn(msg string, args ...interface{})
Fatal(msg string, args ...interface{})
Panic(msg string, args ...interface{})
Infof(msg string, args ...interface{})
Errorf(msg string, args ...interface{})
Debugf(msg string, args ...interface{})
Warnf(msg string, args ...interface{})
Fatalf(msg string, args ...interface{})
Panicf(msg string, args ...interface{})
}
var DbLogger LoggerInterface = &zrlog{}
var Logger LoggerInterface = &zrlog{}
func Newzrlog ¶
func Newzrlog() LoggerInterface
Click to show internal directories.
Click to hide internal directories.