logger

package
v0.0.0-...-6302c98 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 13 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetErrorField

func GetErrorField(err error) []zap.Field

func GetTraceField

func GetTraceField(ctx context.Context) zap.Field

Types

type AppLogger

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

func InitLogger

func InitLogger(name string, logConfig *config.LogConfig, isReInit bool) *AppLogger

InitLogger 初始化Logger对象

func Logger

func Logger() *AppLogger

GetDefaultLogger 获得默认Logger对象

func LoggerByName

func LoggerByName(name string) *AppLogger

func (*AppLogger) DPanic

func (s *AppLogger) DPanic(msg interface{}, fields ...zap.Field)

func (*AppLogger) DPanicCtx

func (s *AppLogger) DPanicCtx(ctx context.Context, msg interface{}, fields ...zap.Field)

func (*AppLogger) DPanicf

func (s *AppLogger) DPanicf(fmtstr string, args ...interface{})

func (*AppLogger) Debug

func (s *AppLogger) Debug(msg interface{}, fields ...zap.Field)

func (*AppLogger) DebugCtx

func (s *AppLogger) DebugCtx(ctx context.Context, msg interface{}, fields ...zap.Field)

func (*AppLogger) Debugf

func (s *AppLogger) Debugf(fmtstr string, args ...interface{})

func (*AppLogger) Error

func (s *AppLogger) Error(msg interface{}, fields ...zap.Field)

func (*AppLogger) Error2

func (s *AppLogger) Error2(err error, msg interface{}, fields ...zap.Field)

func (*AppLogger) ErrorCtx

func (s *AppLogger) ErrorCtx(ctx context.Context, msg interface{}, fields ...zap.Field)

func (*AppLogger) ErrorCtx2

func (s *AppLogger) ErrorCtx2(ctx context.Context, err error, msg interface{}, fields ...zap.Field)

func (*AppLogger) Errorf

func (s *AppLogger) Errorf(fmtstr string, args ...interface{})

func (*AppLogger) Fatal

func (s *AppLogger) Fatal(msg interface{}, fields ...zap.Field)

func (*AppLogger) FatalCtx

func (s *AppLogger) FatalCtx(ctx context.Context, msg interface{}, fields ...zap.Field)

func (*AppLogger) Fatalf

func (s *AppLogger) Fatalf(fmtstr string, args ...interface{})

func (*AppLogger) Info

func (s *AppLogger) Info(msg interface{}, fields ...zap.Field)

func (*AppLogger) InfoCtx

func (s *AppLogger) InfoCtx(ctx context.Context, msg interface{}, fields ...zap.Field)

func (*AppLogger) Infof

func (s *AppLogger) Infof(fmtstr string, args ...interface{})

func (*AppLogger) Panic

func (s *AppLogger) Panic(msg interface{}, fields ...zap.Field)

func (*AppLogger) PanicCtx

func (s *AppLogger) PanicCtx(ctx context.Context, msg interface{}, fields ...zap.Field)

func (*AppLogger) Panicf

func (s *AppLogger) Panicf(fmtstr string, args ...interface{})

func (*AppLogger) Printf

func (s *AppLogger) Printf(ctx context.Context, msg string, fields ...interface{})

func (*AppLogger) Warn

func (s *AppLogger) Warn(msg interface{}, fields ...zap.Field)

func (*AppLogger) WarnCtx

func (s *AppLogger) WarnCtx(ctx context.Context, msg interface{}, fields ...zap.Field)

func (*AppLogger) Warnf

func (s *AppLogger) Warnf(fmtstr string, args ...interface{})

Jump to

Keyboard shortcuts

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