log

package
v0.0.0-...-c58336e Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

View Source
const (
	LoggerTag = "logger"
)

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug .

func DebugContext

func DebugContext(ctx context.Context, args ...interface{})

DebugContext .

func DebugContextf

func DebugContextf(ctx context.Context, format string, args ...interface{})

DebugContextf .

func Debugf

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

Debugf .

func Error

func Error(args ...interface{})

Error .

func ErrorContext

func ErrorContext(ctx context.Context, args ...interface{})

ErrorContext .

func ErrorContextf

func ErrorContextf(ctx context.Context, format string, args ...interface{})

ErrorContextf .

func Errorf

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

Errorf .

func Fatal

func Fatal(args ...interface{})

Fatal .

func FatalContext

func FatalContext(ctx context.Context, args ...interface{})

FatalContext .

func FatalContextf

func FatalContextf(ctx context.Context, format string, args ...interface{})

FatalContextf .

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf .

func GetLogger

func GetLogger() *zap.SugaredLogger

func Info

func Info(args ...interface{})

Info .

func InfoContext

func InfoContext(ctx context.Context, args ...interface{})

InfoContext .

func InfoContextf

func InfoContextf(ctx context.Context, format string, args ...interface{})

InfoContextf .

func Infof

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

Infof .

func InitLogger

func InitLogger(fileName string, maxSize, maxBackups, maxAge, level, callerSkip int)

func NewZapGormLogger

func NewZapGormLogger() logger.Interface

NewZapGormLogger New一个logger实例

func Warn

func Warn(args ...interface{})

Warn .

func WarnContext

func WarnContext(ctx context.Context, args ...interface{})

WarnContext .

func WarnContextf

func WarnContextf(ctx context.Context, format string, args ...interface{})

WarnContextf .

func Warnf

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

Warnf .

Types

type ZapGormLogger

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

ZapGormLogger 给gorm适配使用的logger

func (ZapGormLogger) Error

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

Error .

func (ZapGormLogger) Info

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

Info .

func (ZapGormLogger) LogMode

func (l ZapGormLogger) LogMode(level logger.LogLevel) logger.Interface

LogMode .

func (ZapGormLogger) Trace

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

Trace .

func (ZapGormLogger) Warn

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

Warn .

Jump to

Keyboard shortcuts

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