Documentation ¶
Overview ¶
Example ¶
tx, _ := gorm.Open(nil, &gorm.Config{Logger: NewLogger(slog.Default(), NewConfig())}) // do something with tx _ = tx
Output:
Index ¶
- type Config
- type Logger
- func (l *Logger) Error(ctx context.Context, msg string, args ...interface{})
- func (l *Logger) Info(ctx context.Context, msg string, args ...interface{})
- func (l *Logger) LogMode(level gormlogger.LogLevel) gormlogger.Interface
- func (l *Logger) ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{})
- func (l *Logger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *Logger) Warn(ctx context.Context, msg string, args ...interface{})
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Logger ¶
type Logger struct { Config *slog.Logger }
func (*Logger) LogMode ¶
func (l *Logger) LogMode(level gormlogger.LogLevel) gormlogger.Interface
func (*Logger) ParamsFilter ¶
Click to show internal directories.
Click to hide internal directories.