Documentation ¶
Index ¶
- type Gorm
- func (l *Gorm) Error(ctx context.Context, msg string, data ...interface{})
- func (l *Gorm) Info(ctx context.Context, msg string, data ...interface{})
- func (l *Gorm) LogMode(level logger.LogLevel) logger.Interface
- func (l *Gorm) Trace(ctx context.Context, begin time.Time, ...)
- func (l *Gorm) Warn(ctx context.Context, msg string, data ...interface{})
- type GormConfig
- type GormSetting
- type Interface
- type LogLevel
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Debugln(args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Errorln(args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Fatalln(args ...interface{})
- func (l *Logger) GetEntry() *logrus.Entry
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Infoln(args ...interface{})
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) Panicf(format string, args ...interface{})
- func (l *Logger) Panicln(args ...interface{})
- func (l *Logger) Print(args ...interface{})
- func (l *Logger) Printf(format string, args ...interface{})
- func (l *Logger) Println(args ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- func (l *Logger) Warning(args ...interface{})
- func (l *Logger) Warningf(format string, args ...interface{})
- func (l *Logger) Warningln(args ...interface{})
- func (l *Logger) Warnln(args ...interface{})
- func (l *Logger) WithContext(ctx context.Context) *Logger
- func (l *Logger) WithContextValue(key string) *Logger
- func (l *Logger) WithError(err error) *Logger
- func (l *Logger) WithField(key string, value interface{}) *Logger
- func (l *Logger) WithFields(fields logrus.Fields) *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gorm ¶ added in v0.0.21
type Gorm struct {
// contains filtered or unexported fields
}
Gorm struct.
type GormConfig ¶
type GormConfig struct { // If the time specified by SlowThreshold is exceeded, it is displayed in the log as a SlowQuery. SlowThreshold time.Duration // If true is specified for IgnoreRecordNotFoundError, no log is output at the error level even if the record does not exist as a search result. // If false, logs are output at the error level when a record does not exist as a search result. IgnoreRecordNotFoundError bool // LogLevel outputs logs above the specified level. LogLevel LogLevel }
GormConfig set configurations.
type GormSetting ¶ added in v0.0.21
type GormSetting struct { Logger *logrus.Logger GormConfig *GormConfig }
GormSetting sets configurations.
type Interface ¶
type Interface interface { LogMode(logger.LogLevel) Interface Info(context.Context, string, ...interface{}) Warn(context.Context, string, ...interface{}) Error(context.Context, string, ...interface{}) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) }
Interface Gorm Logger interface.
type Logger ¶
Logger struct.
func (*Logger) Debugln ¶
func (l *Logger) Debugln(args ...interface{})
Debugln outputs debug level log.
func (*Logger) Errorln ¶
func (l *Logger) Errorln(args ...interface{})
Errorln outputs error level log.
func (*Logger) Fatalln ¶
func (l *Logger) Fatalln(args ...interface{})
Fatalln outputs fatal level log.
func (*Logger) Warning ¶
func (l *Logger) Warning(args ...interface{})
Warning outputs warn level log.
func (*Logger) Warningln ¶
func (l *Logger) Warningln(args ...interface{})
Warningln outputs warn level log.
func (*Logger) WithContext ¶
WithContext calls WithContext function of logger entry.
func (*Logger) WithContextValue ¶
WithContextValue calls WithField function of logger entry.
Click to show internal directories.
Click to hide internal directories.