logs

package
v0.5.19 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSqlLog added in v0.5.18

func NewSqlLog(l *log.Logger, config logger.Config, skips ...string) logger.Interface

NewSqlLog skip 需要屏蔽的sql

Types

type GinLogrus

type GinLogrus struct{}

func (*GinLogrus) Write

func (g *GinLogrus) Write(p []byte) (n int, err error)

type Hook added in v0.1.8

type Hook struct{}

Hook 记录log

func (*Hook) AfterProcess added in v0.1.8

func (h *Hook) AfterProcess(ctx context.Context, cmd redis.Cmder) error

func (*Hook) AfterProcessPipeline added in v0.1.8

func (h *Hook) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error

func (*Hook) BeforeProcess added in v0.1.8

func (h *Hook) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error)

func (*Hook) BeforeProcessPipeline added in v0.1.8

func (h *Hook) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error)

type SqlLog added in v0.5.18

type SqlLog struct {
	L *log.Logger
	logger.Config
	// contains filtered or unexported fields
}

func (*SqlLog) Error added in v0.5.18

func (l *SqlLog) Error(ctx context.Context, msg string, data ...interface{})

func (*SqlLog) Info added in v0.5.18

func (l *SqlLog) Info(ctx context.Context, msg string, data ...interface{})

func (*SqlLog) LogMode added in v0.5.18

func (l *SqlLog) LogMode(level logger.LogLevel) logger.Interface

LogMode log mode

func (*SqlLog) Printf added in v0.5.18

func (l *SqlLog) Printf(format string, args ...interface{})

func (*SqlLog) Trace added in v0.5.18

func (l *SqlLog) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)

func (*SqlLog) Warn added in v0.5.18

func (l *SqlLog) Warn(ctx context.Context, msg string, data ...interface{})

Jump to

Keyboard shortcuts

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