xlog

package
v0.0.0-...-b804f52 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MulanPSL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Bool        = zap.Bool
	Bools       = zap.Bools
	String      = zap.String
	Strings     = zap.Strings
	ByteString  = zap.ByteString
	ByteStrings = zap.ByteStrings
	Any         = zap.Any
	Array       = zap.Array
	Int         = zap.Int
	Ints        = zap.Ints
	Uint        = zap.Uint
	Uints       = zap.Uints
	Int64       = zap.Int64
	Int64s      = zap.Int64s
	Uint64      = zap.Uint64
	Uint64s     = zap.Uint64s
	Int32       = zap.Int32
	Int32s      = zap.Int32s
	Uint32      = zap.Uint32
	Uint32s     = zap.Uint32s
	Int16       = zap.Int16
	Int16s      = zap.Int16s
	Uint16      = zap.Uint16
	Uint16s     = zap.Uint16s
	Int8        = zap.Int8
	Int8s       = zap.Int8s
	Uint8       = zap.Uint8
	Uint8s      = zap.Uint8s
	Float64     = zap.Float64
	Float64s    = zap.Float64s
	Float32     = zap.Float32
	Float32s    = zap.Float32s
	Duration    = zap.Duration
	Durations   = zap.Durations
	Time        = zap.Time
	Times       = zap.Times
	Object      = zap.Object
	FieldErr    = zap.Error
	FieldErrs   = zap.Errors
)

Functions

func Build

func Build() error

Build ...

func Debug

func Debug(msg string, field ...Field)

func Debugf

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

func Error

func Error(msg string, field ...Field)

func Errorf

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

func Errorw

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

func Info

func Info(msg string, field ...Field)

func Infof

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

func Infow

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

func NewZapLogErrorHandler

func NewZapLogErrorHandler() *logErrorHandler

func Panic

func Panic(msg string, field ...Field)

func Panicf

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

func Warn

func Warn(msg string, field ...Field)

func Warnf

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

Types

type Config

type Config struct {
	Prefix         string
	Level          string
	PathDir        string
	Development    bool
	DisableCaller  bool
	ConsoleEncoder bool
	MaxSize        int
	MaxBackups     int
	MaxAge         int
}

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig ...

type Field

type Field = zap.Field

type Level

type Level = zapcore.Level

Jump to

Keyboard shortcuts

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