dblog

package
v0.0.0-...-11d4248 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Zlog          *zap.SugaredLogger
	Loglevel      logger.LogLevel
	SlowThreshold time.Duration
}

Logger logger

func New

func New(zlog *zap.SugaredLogger, debug ...bool) Logger

New new logger

func (Logger) Error

func (l Logger) Error(ctx context.Context, str string, args ...interface{})

Error error

func (Logger) Info

func (l Logger) Info(ctx context.Context, str string, args ...interface{})

Info info

func (Logger) LogMode

func (l Logger) LogMode(loglevel logger.LogLevel) logger.Interface

LogMode logmode

func (Logger) Trace

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

Trace trace

func (Logger) Warn

func (l Logger) Warn(ctx context.Context, str string, args ...interface{})

Warn warn

Jump to

Keyboard shortcuts

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