Skip to content

Commit

Permalink
add ParamsFilter to logger interface
Browse files Browse the repository at this point in the history
  • Loading branch information
shedyfreak committed Nov 7, 2023
1 parent b371257 commit 47f9280
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type Interface 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)
ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{})
}

var (
Expand Down Expand Up @@ -128,13 +129,6 @@ func (l *logger) LogMode(level LogLevel) Interface {
return &newlogger
}

// SetConfig Allow setting configs for your own log implementation
func (l *logger) SetConfig(config Config) Interface {
newlogger := *l
newlogger.Config = config
return &newlogger
}

// Info print info
func (l logger) Info(ctx context.Context, msg string, data ...interface{}) {
if l.LogLevel >= Info {
Expand Down

0 comments on commit 47f9280

Please sign in to comment.