logger

package
v0.0.0-...-f03bf9e Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(logger Logger)

Types

type DBLogger

type DBLogger struct {
	Logger
}

func NewDbLogger

func NewDbLogger(log Logger) *DBLogger

func (*DBLogger) Error

func (l *DBLogger) Error(ctx context.Context, s string, i ...interface{})

func (*DBLogger) Info

func (l *DBLogger) Info(ctx context.Context, s string, i ...interface{})

func (*DBLogger) LogMode

func (l *DBLogger) LogMode(level glogger.LogLevel) glogger.Interface

func (*DBLogger) Trace

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

func (*DBLogger) Warn

func (l *DBLogger) Warn(ctx context.Context, s string, i ...interface{})

type Logger

type Logger interface {
	Error(interface{})
	Errorf(string, ...interface{})
	Warn(interface{})
	Warnf(string, ...interface{})
	Info(interface{})
	Infof(string, ...interface{})
	Debug(interface{})
	Debugf(string, ...interface{})
	SetDebug(enable bool)
	With(string) Logger
}

func NewLogger

func NewLogger(name string) Logger

Jump to

Keyboard shortcuts

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