log

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtendLogger

func ExtendLogger(logger *zap.SugaredLogger, label string, value interface{}) *zap.SugaredLogger

func GinLogger

func GinLogger() gin.HandlerFunc

func NewGORMLogger

func NewGORMLogger(conf gormlog.Config) gormlog.Interface

func NewLogger

func NewLogger(pkg string) *zap.SugaredLogger

func SetLogLevel

func SetLogLevel(logLevel string)

Types

type GORMLogger

type GORMLogger struct {
	gormlog.Config
	// contains filtered or unexported fields
}

func (*GORMLogger) Error

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

func (*GORMLogger) Info

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

func (*GORMLogger) LogMode

func (l *GORMLogger) LogMode(logLevel gormlog.LogLevel) gormlog.Interface

func (*GORMLogger) Trace

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

func (*GORMLogger) Warn

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