zlog

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 8 Imported by: 0

README

zlog

Documentation

Index

Constants

View Source
const (
	DebugLevel  = zapcore.DebugLevel
	InfoLevel   = zapcore.InfoLevel
	WarnLevel   = zapcore.WarnLevel
	ErrorLevel  = zapcore.ErrorLevel
	DPanicLevel = zapcore.DPanicLevel
	PanicLevel  = zapcore.PanicLevel
	FatalLevel  = zapcore.FatalLevel
)

Variables

This section is empty.

Functions

func DPanic

func DPanic(args ...interface{})

func DPanicf

func DPanicf(template string, args ...interface{})

func DPanicln

func DPanicln(args ...interface{})

func DPanicw

func DPanicw(msg string, keysAndValues ...interface{})

func Debug

func Debug(args ...interface{})

-------------------- slogger functions mapping --------------------

func Debugf

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

func Debugln

func Debugln(args ...interface{})

func Debugw

func Debugw(msg string, keysAndValues ...interface{})

func Error

func Error(args ...interface{})

func Errorf

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

func Errorln

func Errorln(args ...interface{})

func Errorw

func Errorw(msg string, keysAndValues ...interface{})

func FDPanic

func FDPanic(msg string, fields ...zapcore.Field)

func FDebug

func FDebug(msg string, fields ...zapcore.Field)

-------------------- logger functions mapping --------------------

func FError

func FError(msg string, fields ...zapcore.Field)

func FFatal

func FFatal(msg string, fields ...zapcore.Field)

func FInfo

func FInfo(msg string, fields ...zapcore.Field)

func FPanic

func FPanic(msg string, fields ...zapcore.Field)

func FWarn

func FWarn(msg string, fields ...zapcore.Field)

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func Fatalln

func Fatalln(args ...interface{})

func Fatalw

func Fatalw(msg string, keysAndValues ...interface{})

func Info

func Info(args ...interface{})

func Infof

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

func Infoln

func Infoln(args ...interface{})

func Infow

func Infow(msg string, keysAndValues ...interface{})

func InitZlog

func InitZlog(cfg ZlogConfig)

func L

func L() *zap.Logger

func Panic

func Panic(args ...interface{})

func Panicf

func Panicf(template string, args ...interface{})

func Panicln

func Panicln(args ...interface{})

func Panicw

func Panicw(msg string, keysAndValues ...interface{})

func SL

func SL() *zap.SugaredLogger

func Sync

func Sync() error

func Warn

func Warn(args ...interface{})

func Warnf

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

func Warnln

func Warnln(args ...interface{})

func Warnw

func Warnw(msg string, keysAndValues ...interface{})

Types

type Level

type Level = zapcore.Level

type Logger

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

func NewWithBufferedWriteSyncer

func NewWithBufferedWriteSyncer(writeSyncer *zapcore.BufferedWriteSyncer, level Level) *Logger

type ZlogConfig

type ZlogConfig struct {
	LogPath     string
	LogFileName string
	LogLevel    Level
	MaxCount    int
	MaxAge      time.Duration
	RotateTime  time.Duration
}

Jump to

Keyboard shortcuts

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