logger

package
v1.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopulatedSql added in v1.0.9

func PopulatedSql(query string, args ...interface{}) string

Types

type ISqlLogger

type ISqlLogger interface {
	Log(ctx context.Context, query string, args ...interface{})
	LogWithErr(ctx context.Context, err error, hit *bool, query string, args ...interface{})
	Enable() bool
	logrus.StdLogger
}

func NewSqlLogger

func NewSqlLogger(logger logrus.StdLogger) ISqlLogger

type SqlLogger

type SqlLogger struct {
	logrus.StdLogger
}

func (*SqlLogger) Enable

func (receiver *SqlLogger) Enable() bool

func (*SqlLogger) Log

func (receiver *SqlLogger) Log(ctx context.Context, query string, args ...interface{})

func (*SqlLogger) LogWithErr added in v1.0.9

func (receiver *SqlLogger) LogWithErr(ctx context.Context, err error, hit *bool, query string, args ...interface{})

func (*SqlLogger) SetLogger

func (receiver *SqlLogger) SetLogger(logger logrus.FieldLogger)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL