Documentation ¶
Overview ¶
FIXME: golangci-lint nolint:govet,revive
Index ¶
- func FlushLogger()
- func InitLogger(writer io.Writer)
- func LogErrorAndPanic(msg string, err 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(_ glogger.LogLevel) glogger.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 ¶
func LogErrorAndPanic ¶
LogErrorAndPanic Records the error, flushes the buffer, then panics the container
Types ¶
type GormLogger ¶
type GormLogger struct {
// contains filtered or unexported fields
}
GormLogger is a custom logger for GORM
func NewGormLogger ¶
func NewGormLogger(logger *logrus.Logger) *GormLogger
NewGormLogger creates a new instance of GormLogger
func (*GormLogger) Error ¶
func (l *GormLogger) Error(ctx context.Context, msg string, data ...interface{})
Error logs an error message
func (*GormLogger) Info ¶
func (l *GormLogger) Info(ctx context.Context, msg string, data ...interface{})
Info logs an info message
func (*GormLogger) LogMode ¶
func (l *GormLogger) LogMode(_ glogger.LogLevel) glogger.Interface
LogMode sets the log mode for GORM
Click to show internal directories.
Click to hide internal directories.