log

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.1.1

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

func Debugf added in v0.1.1

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

func Error added in v0.1.1

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

func Errorf added in v0.1.1

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

func Fatal added in v0.1.1

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

func Fatalf added in v0.1.1

func Fatalf(ctx context.Context, msg string, args ...interface{})

func GetLevel added in v0.1.1

func GetLevel(output ...string) zapcore.Level

GetLevel 获取输出端日志级别

func Info added in v0.1.1

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

func Infof added in v0.1.1

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

func L

func L() logger.Logger

L return default logger

func Register

func Register(f logger.LoggerFactory)

func SetLevel added in v0.1.1

func SetLevel(level zapcore.Level, output ...string)

SetLevel 设置输出端日志级别

func Sync added in v0.1.1

func Sync() error

Sync calls the underlying Core's Sync method, flushing any buffered log entries. Applications should take care to call Sync before exiting

func Warn added in v0.1.1

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

func Warnf added in v0.1.1

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

func WithFields added in v0.1.1

func WithFields(fields ...zapcore.Field) logger.Logger

WithFields 设置一些业务自定义数据到每条log里:比如uid,imei等

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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