log

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func CtxDebug

func CtxDebug(ctx context.Context, msg string, fields ...zap.Field)

func CtxError

func CtxError(ctx context.Context, msg string, fields ...zap.Field)

func CtxInfo

func CtxInfo(ctx context.Context, msg string, fields ...zap.Field)

func CtxWarn

func CtxWarn(ctx context.Context, msg string, fields ...zap.Field)

func Debug

func Debug(msg string, fields ...zap.Field)

func Debugf

func Debugf(msg string, args ...interface{})

func Error

func Error(msg string, fields ...zap.Field)

func Errorf

func Errorf(msg string, args ...interface{})

func GetLogger

func GetLogger() *zap.Logger

func GetSugared

func GetSugared() *zap.SugaredLogger

func Info

func Info(msg string, fields ...zap.Field)

func Infof

func Infof(msg string, args ...interface{})

func Init

func Init(conf conf.Log)

func Set

func Set(l *zap.Logger)

func Warn

func Warn(msg string, fields ...zap.Field)

func Warnf

func Warnf(msg string, args ...interface{})

func WithContext

func WithContext(ctx context.Context) *zap.Logger

Types

type Log

type Log interface {
	Info(ctx context.Context, msg string, fields ...zap.Field)
	Warn(ctx context.Context, msg string, fields ...zap.Field)
	Error(ctx context.Context, msg string, fields ...zap.Field)
	Fatal(ctx context.Context, msg string, fields ...zap.Field)
	Debug(ctx context.Context, msg string, fields ...zap.Field)
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(l *zap.Logger, s *zap.SugaredLogger) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, fields ...zap.Field)

func (*Logger) Debugf

func (l *Logger) Debugf(tmp string, args ...interface{})

func (*Logger) Error

func (l *Logger) Error(msg string, fields ...zap.Field)

func (*Logger) Errorf

func (l *Logger) Errorf(tmp string, args ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(msg string, fields ...zap.Field)

func (*Logger) Fatalf

func (l *Logger) Fatalf(tmp string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, fields ...zap.Field)

func (*Logger) Infof

func (l *Logger) Infof(tmp string, args ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(msg string, fields ...zap.Field)

func (*Logger) Warnf

func (l *Logger) Warnf(tmp string, args ...interface{})

func (*Logger) WithContext

func (l *Logger) WithContext(ctx context.Context) *zap.Logger

Jump to

Keyboard shortcuts

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