logs

package
v0.5.16 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMysqlLog added in v0.1.8

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

NewMysqlLog 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 MysqlLog

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

func (*MysqlLog) Error

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

func (*MysqlLog) Info

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

func (*MysqlLog) LogMode

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

LogMode log mode

func (*MysqlLog) Printf added in v0.1.8

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

func (*MysqlLog) Trace

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

func (*MysqlLog) Warn

func (l *MysqlLog) 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